Mysqld Solution - Can't init databases /usr/libexec/mysqld: Can't read dir of '/tmp/' (Errcode: 13) /usr/libexec/mysqld: Can't create/write to file '/tmp/ibyP1qUC' (Errcode: 13) 100215 7:02:24 InnoDB: Error: unable to create temporary file; errno

100215 07:02:24  mysqld started
/usr/libexec/mysqld: Can't read dir of '/tmp/' (Errcode: 13)
/usr/libexec/mysqld: Can't create/write to file '/tmp/ibyP1qUC' (Errcode: 13)
100215  7:02:24  InnoDB: Error: unable to create temporary file; errno: 13
100215  7:02:24 [ERROR] Can't init databases
100215  7:02:24 [ERROR] Aborting

100215  7:02:24 [Note] /usr/libexec/mysqld: Shutdown complete

100215 07:02:24  mysqld ended

One of my servers was rebooted for some reason and all sites and e-mail accounts were down because the database could not be connected.  The first thing I checked was mysqld of course and it was not running.  The above was revealed in /var/log/mysqld.log

I was starting to panic and wondered if the server was compromised and I even checked /var/lib/mysql to make sure all the database data was still there.

The solution for this MySQL Error is simple:

chown root.root /tmp

chmod 1777 /tmp

And of course be sure that you start MySQL again.

Latest Articles

  • Openvz Quick Install for CentOS 5 Tutorial
  • Subnet Mask Lengths / Quick Reference
  • Linux How To Add/Delete A Default Route/Gateway
  • DRBD WFConnection Problem/Solution
  • How not to change an IP address in CPanel during a migration
  • CPanel Cannot Login Internal Server Error Could not fetch uid or gid for : root https://192.168.1.42:2083
  • sed script to automatically update IPs in named/BIND and httpd/Apache
  • mdadm Linux Software RAID QuickStart Guide
  • HeartBeat Error/High Load heartbeat: [7120]: WARN: Gmain_timeout_dispatch: Dispatch function for retransmit request took too long to execute: 20 ms (> 10 ms) (GSource: 0x926b390)
  • VirtualBox Error Failed to start the virtual machine Centos 5.5 Mirror. Medium '/home/testuser/.VirtualBox/HardDisks/Centos 5.5 Mirror.vdi' is not accessible. UUID {a1a9fad7-0402-4867-b8f3-39fb49454bc5} of the medium '/home/testuser/.VirtualBox/HardD
  • Installing Virtualbox on Centos 5.5
  • Openvz Live Migration Error - Error: undump failed: Invalid argument Restoring failed: Error: iptables-restore exited with 2 Error: Most probably some iptables modules are not loaded Error: rst_restore_net: -22
  • OpenOffice Writer Default Paragraph Annoyance
  • DirectAdmin Install Webalizer Stats
  • Ubuntu Linux HTML Rendering left bracket < problem appears as 003C box
  • Solution - error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory
  • Linux Kernel Boot Black Screen of Death Freeze/Halt Solution
  • Linux Kernel Freeze/Hang during boot on io scheduler cfq registered (default)
  • VirtualBox/VBOX Centos 5.5 Installation Kernel Freeze Problem "NET: Registered protocol family 2" And Solution
  • VirtualBox OSE/VBOX Can't Access Shared Folder Solution