I installed mysql and mysql-server from the repos (MySQL version 5.5). Then tried to start it, but got an error.

[root@server]# service mysqld start
Redirecting to /bin/systemctl start  mysqld.service
Job failed. See system logs and 'systemctl status' for details.

Here is the log:

121118  2:41:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
121118  2:41:38 [Note] Plugin 'FEDERATED' is disabled.
121118  2:41:38 InnoDB: The InnoDB memory heap is disabled
121118  2:41:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121118  2:41:38 InnoDB: Compressed tables use zlib 1.2.5
121118  2:41:38 InnoDB: Using Linux native AIO /usr/libexec/mysqld: Can't create/write to file '/tmp/ibhsfQfU' (Errcode: 13)
121118  2:41:38  InnoDB: Error: unable to create temporary file; errno: 13
121118  2:41:38 [ERROR] Plugin 'InnoDB' init function returned error.
121118  2:41:38 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121118  2:41:38 [ERROR] Unknown/unsupported storage engine: InnoDB
121118  2:41:38 [ERROR] Aborting

121118  2:41:38 [Note] /usr/libexec/mysqld: Shutdown complete

121118 02:41:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Fresh installation, nothing changed prior to that, just ran yum update.

Here is the systemctl status trace

[root@linyansho /]# systemctl status mysqld.service
mysqld.service - MySQL database server
  Loaded: loaded (/lib/systemd/system/mysqld.service; disabled)
  Active: failed since Sun, 18 Nov 2012 02:45:19 +0300; 5min ago
  Process: 864 ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID (code=exited, status=1/FAILURE)
  Process: 863 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
  Process: 842 ExecStartPre=/usr/libexec/mysqld-prepare-db-dir %n (code=exited, status=0/SUCCESS)
  CGroup: name=systemd:/system/mysqld.service
  • I'm guessing your /tmp isn't world writeable. – Philᵀᴹ Nov 19 '12 at 1:30

Ensure you have enough space in / and data dir.

  1. Kill all processes for mysql in ps -ef | grep -i mysql
  2. If you see any any ibdata file generated under your default data directory you may remove them also iblogfile1,2 since its a fresh installation no need to safe backup them.
  3. chown -R mysql:root /var/lib/mysql
  4. chmod -R 775 /var/lib/mysql also the same permissions to /etc/my.cnf.
  5. Now try to start the instance by issuing /etc/init.d/mysql start and tail -f /var/log/mysqld.log. It should start without any issues if you get any error message .
|improve this answer|||||

Check the temp file permissions.


  1. Go to your my.cnf file and find the tmpdir variable. It will be something like tmpdir=/var/untd/tmp.
  2. Change file permissions like below.

    chown mysql:mysql /var/untd/tmp
  3. Now you can start MySQL using mysqld_safe

    mysqld_safe --user=root&
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy