/usr/libexec/mysqld: Can’t create/write to file ‘/tmp/’ (Errcode: 13)

转载 2013年12月04日 19:21:44

转自:http://www.cyberciti.biz/faq/mysqld-innodb-error-unable-to-create-temporary-file/

在执行mysql_install_db的时候报错:/usr/libexec/mysqld: Can’t create/write to file ‘/tmp/’ (Errcode: 13)

Q. I’m using Red Hat enterprise Linux version 4.0 and MySQL version 4.20. Monit has recently notified me following error:
mysqld' failed to start.

A detailed log from /var/log/mysqld.log file:

/usr/libexec/mysqld: Can't create/write to file '/tmp/ibCfJwf1' (Errcode: 13)
070420 10:07:58 InnoDB: Error: unable to create temporary file; errno: 13
070420 10:07:58 [ERROR] Can't init databases
070420 10:07:58 [ERROR] Aborting

070420 10:07:58 [Note] /usr/libexec/mysqld: Shutdown complete

/etc/init.d/mysql start command returned following output:
Initializing MySQL database: [ OK ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

How do I fix this problem?

A. MySQL is not able to access your /tmp directory to wirte and create temporary files. Make sure /tmp is owned by root and sticky bit is set on /tmp directory. Type the following commands to fix the error:
# chown root:root /tmp
# chmod 1777 /tmp
# /etc/init.d/mysqld start

Now mysql should start without a problem.

相关文章推荐

ERROR 1 (HY000): Can't create/write to file '/test.txt' (Errcode: 13)

      在做导出数据的时候遇到的问题,遇到此问题。      Select * into outfile '/tmp/test.txt' fields terminated by ',' opti...

confluence创建文件报错 can not create to file /tmp/xxx Errcode:28,引出的 df命令高级用法

使用confluence创建文件时,报错如下: Can't create/write to file '/tmp/#sql_118c_0.MYI' (Errcode: 28); nested exc...

mysqldump: Got error: 1: Can't create/write to file '/data/export/test.txt' (Errcode: 13)

问题需要将数据已csv格式导出到/data/export/路径下,遇到问题: mysqldump: Got error: 1: Can’t create/write to file ‘/data/e...
  • saife
  • saife
  • 2016年04月07日 15:22
  • 1720

Can’t create/write to file ‘c:\temp/#sql-XXX.MYI′ -- 解决办法

Can’t create/write to file ‘c:\temp/#sql-XXX.MYI′ -- 解决办法 Can’t create/write to file ‘c:\temp/#sql-...

mysql数据库配置文件和Can't create/write to file(errno13)

mysql数据库配置文件和Can't create/write to file(errno13) 2009-07-01 11:54 在ubuntu8。04环境下用新立得安装...
  • samxx8
  • samxx8
  • 2012年05月28日 09:36
  • 12357

MySQL into outfile 问题解决:ERROR 1 (HY000): Can't create/write to file

任务:从MySQL导数据导出数据到本地——select * into outfile '/home/spark/data.csv' fields terminated by ',' lines ter...
  • duxu24
  • duxu24
  • 2016年12月15日 14:04
  • 500

InnoDB: Error: unable to create temporary file; errno: 13

^G/usr/sbin/mysqld: Can't create/write to file '/home/tmp_test/ibJOkvIT' (Errcode: 13) 160511 16:46:...

How to apply a patch/diff and solve “hunk FAILED”, “can’t find file to patch” and others

Hi  After you read this article, you’ll be able to apply patch files/diffs and deal with possible e...

MySQL异常:Incorrect key file for table '/tmp/#sql_37b_1.MYI'; try to repair it

今天突然收到报警短信,提示网站有一个模块出现异常,当时我就方了 检查了下日志,发现异常如下:Caused by: java.sql.SQLException: Incorrect key file f...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:/usr/libexec/mysqld: Can’t create/write to file ‘/tmp/’ (Errcode: 13)
举报原因:
原因补充:

(最多只允许输入30个字)