MySQL service is failing to start up with error “Can’t init databases”
Following is the error message in mysql server log file /var/log/mysqld.log:
/usr/libexec/mysqld: Can’t create/write to file ‘/tmp/ibCfJwf1? (Errcode: 13)
While trying to start it, following is the error.
Initializing MySQL database: [ OK ]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
This error occurs when MySQL is not able to access the /tmp directory to write and create temporary files. Make sure /tmp is owned by root and 1777 permisssion is set on /tmp directory.
Following commands will fix the problem.
# chown root:root /tmp
# chmod 777 /tmp
# /etc/init.d/mysqld start
# chmod 777 /tmp
# /etc/init.d/mysqld start
Now MySQL should start without a problem.
Leave a Reply
You must be logged in to post a comment.