woff 發表於 2012-1-5 18:17:03

phpmyadmin 寫入文件的/ tmp /#sql_xxxx.MYI“(ERRCODE:13)

今天網頁 SERVER突然連不到資料庫


錯誤訊息
Can't create/write to file '/tmp/#sql_xxxx.MYI' (Errcode: 13)無法創建文件/寫入文件的/ tmp /#sql_xxxx.MYI“(ERRCODE:13)
doing perror 13 says:做perror 13說:
OS error code 13: Permission denied I find the tmpdir lik so: TMPDIR力,使我覺得:
mysqladmin -p variables | grep -w tmpdir | tmpdir | /tmp Now that means that mysql cannot write to /tmp.現在,這意味著 MySQL不能寫入到/ tmp。 Making the permissions to :777 fixes that.使權限:777修補程序。


結果問題是/tmp 目錄無法寫入


看起來像權限在/ tmp是錯誤的。 They really should be read/write/execute for everyone with the sticky bit set.他們真的要讀 /寫 /執行為大家設置了sticky位。


使用
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. sticky位,添加一些限制其他用戶如何與不創建或他們所擁有的文件的互動,因此沒有理由擔心。
If you wish, you may also create a seperate directory owned and writeable my the mysql user and specify that directory in my.cnf to be used instead of the system wide /tmp.如果你願意,你也可以創建一個單獨的目錄中,國有及可寫我的MySQL用戶並指定要使用的全系統的/ tmp目錄,而不是在my.cnf中的目錄。
頁: [1]
查看完整版本: phpmyadmin 寫入文件的/ tmp /#sql_xxxx.MYI“(ERRCODE:13)