php mysql Errcode: 28 终极解决方法

yipeiwu_com6年前Mysql基础
perror 28
Error code 28: No space left on device

SQL语句执行错误:SELECT title,gid FROM blog_blog WHERE date < 1246200383 and hide = 'n' and type='blog' ORDER BY date DESC LIMIT 1
Error writing file 'C:\WINDOWS\TEMP\MY9B6F.tmp' (Errcode: 28)

解决方法:

1.释放C:\WINDOWS\TEMP\空间

2.因为原表太大,所以查询时生成的临时表过大,因此出错。
解决办法。重启了mysql,然后加上where分三段查询,避免全表扫描。

测试结果:第一个有用,第二个有道理,没测试过,过了第一个就解决了,第二个以后好好研究下

相关文章

PHP 使用MySQL管理Session的回调函数详解

复制代码 代码如下:<?php class MySession extends DBSQL {  /**   * __constr...

php并发对MYSQL造成压力的解决方法

PHP页面有一个浏览量统计每秒有200并发,造成insert给mysql造成很大压力 lnmp环境,其他页面内容都做了缓存了,没有多大的负载,就是这个浏览量统计功能,给mysql带来不小...

PHP读取ACCESS数据到MYSQL的代码

复制代码 代码如下: <?php header('ontent-Type:text/html;charset=GB2312');//避免输出乱码 $dbhost ="localho...

php mysql like 实现多关键词搜索的方法

或者叫,分词检索数据库 $res = mysql_query("select * from peter where id like '%中草药%' and '%6%'"); //这样写是...

Can't create/write to file 'C:\WINDOWS\TEMP\...MYSQL报错解决方法

错误提示:Error: Can't create/write to file 'C:\WINDOWS\TEMP\#sql_738_0.MYD' (Errcode: 17) Errno....