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)

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

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

Now MySQL should start without a problem.





Both comments and pings are currently closed.

Comments are closed.