解决“Error errcode 13 Can't
How do I fix the following error SQL/DB Error errcode 13 Can't create/write to file?
Problem: The MySQL variable tmpdir is set to a directory that cannot be written to when using PHP to access MySQL.
To verify this, enter MySQL at the command line and type show variables;
You'll get a long list and one of them will read: tmpdir = /somedir/ (whatever your setting is.)
Solution: Alter the tmpdir variable to point to a writable directory.
Steps:
Find the my.cnf file. On *nix systems this is usually in /etc/.
Once found, open this in a simple text editor and find the [mysqld] section.
Under this section, find the tmpdir line. If this line is commented (has a # at the start), delete the # and edit the line so that it reads: tmpdir = /writable/dir where /writable/dir is a directory to which you can write. Some use /tmp, or you might also try /home//.
Save the file.
Shutdown MySQL by typing mysqlshutdown -u -p shutdown.
Start MySQL by going to the MySQL directory and typing ./bin/safe_mysqld &. Usually the MySQL directory is in /usr/local or sometimes in /usr/ on Linux systems.
If none of this make sense and you have someone to administrate your system for you, show the above to them and they should be able to figure it out.
- 转载请注明来源:IT学习者 网址:http://www.itlearner.com/ 向您的朋友推荐此文章
- 文章关键词: Error
- 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系我们,我们会尽快予以更正。
- ·分享比file_get_contents稳定的curl_get_contents
- ·ArrayOf_xsd_string格式在php下的处理
- ·Trying to clone an uncloneable object of class Imagic的解决
- ·win2003服务器使用WPS的COM组件的一些问题解决
- ·首选域的选择(根域名如何正确的跳转到www域名)
- ·PHP警告Cannot use a scalar value as an array的解决
- ·你见过ORDER BY -title DESC这种用法吗?
- ·mongodb在windows下的安装
- ·sphinx用c写的扩展性能还不如php写的api?
