MySQL Error : Can't create/write to file '/var/mysqltmp/#sql_1fbd_0.MYI' (Errcode: 13)

五迷三道 提交于 2019-12-13 15:24:45

问题


yesterday i got bad getway error while browsing my vb forum

and today my forum back to work ... but most of links give this error

MySQL Error   : Can't create/write to file '/var/mysqltmp/#sql_1fbd_0.MYI' (Errcode: 13)

i search for simillar problem and got that this is premission problem

using FTP account i didnt found this directory "var/mysqltmp" so i made it and set premission to 777

but problem not solved

i read that this must fixed using Shell SSH ... but i didnt found a good explain about hoe to use shell SSH , because im Win Xp user :(

does this problem can be solved from FTP or Cpanel ? or its a server problem ?

thanks for help in advance


回答1:


It looks like your permissions on /tmp are wrong. They really should be read/write/execute for everyone with the sticky bit set.

chmod 1777 /tmp

The sticky bit add some restrictions to how other users interact with files not created or owned by them, so there's no reason to worry.

If you wish, you may also create a seperate directory owned and writeable by the mysql user and specify that directory in my.cnf to be used instead of the system wide /tmp.




回答2:


just use

REPAIR TABLE tablename

Docs http://dev.mysql.com/doc/refman/5.1/en/repair-table.html

Of course you must find what table is corrupted.

In most cases its server problem (disk error)




回答3:


Try to run mysql tool that finds corrupted tables: mysqlcheck dbname -uusernamae -p

In my case i didn't receive any errors, but after that the issue with tmpdir was fixed.



来源:https://stackoverflow.com/questions/8114024/mysql-error-cant-create-write-to-file-var-mysqltmp-sql-1fbd-0-myi-errcod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!