4

So seemingly out of nowhere tonight, my wordpress site went down and I've traced it to problems with mysql. Mysql won't start on the server because it keeps failing.

Here is what I'm getting from the logs:

140226 08:54:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140226 08:58:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140226  8:58:20 [Note] Plugin 'FEDERATED' is disabled.
140226  8:58:20 InnoDB: The InnoDB memory heap is disabled
140226  8:58:20 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140226  8:58:20 InnoDB: Compressed tables use zlib 1.2.3
140226  8:58:20 InnoDB: Using Linux native AIO
/usr/libexec/mysqld: Can't create/write to file '/dev/shm/mysql/ibOqUOjF' (Errcode: 2)
140226  8:58:20  InnoDB: Error: unable to create temporary file; errno: 2
140226  8:58:20 [ERROR] Plugin 'InnoDB' init function returned error.
140226  8:58:20 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140226  8:58:20 [ERROR] Unknown/unsupported storage engine: InnoDB
140226  8:58:20 [ERROR] Aborting

I've tried Googling and looking here on Stack Overflow, but I can't seem to find many solutions except to delete the ipdata1 and log files which, as I've read, shouldn't be done with stored data because it would mess up my tables.

This is on an NGINX CentOS 6 server.

Any ideas? I appreciate the help!

6
  • It seems that permission issue on /dev/shm/mysql/ Feb 26, 2014 at 9:18
  • AFAIK System error: 2 = No such file or directory - does the directory exist? Does mysql have permission to write to it? Is there enough space left on the disk?
    – Jon
    Feb 26, 2014 at 9:28
  • @AbdulManaf Duh.. I set those permissions and now it starts, but the site is still 404'ing. This is also in the log: Server hostname (bind-address): '0.0.0.0'; port: 3306 which doesn't seem like it's connecting to the right hostname.
    – evan3168
    Feb 26, 2014 at 9:29
  • @Jon You were spot on. The directory did not exist, so I created it and applied the permissions to mysql. That has allowed mysql to start, however, the site is still not functioning...
    – evan3168
    Feb 26, 2014 at 9:34
  • @evan3168 You need to bind to 0.0.0.0 if you want external access to your database. So MySQL is running, but Nginx is giving you 404 errors? What do the Nginx logs say?
    – Jon
    Feb 26, 2014 at 9:41

2 Answers 2

5

AFAIK System error: 2 = No such file or directory.

Check that the directory exist, that mysql has permission to write to it and that there enough space left on the disk.

2
  • So the directory definitely exists. I've given 776 permission to mysql:mysql. I rebooted the server and now it won't start at all. Even with the directory and permissions fixed. NGINX error logs don't show anything recent.
    – evan3168
    Feb 26, 2014 at 9:58
  • The logs were saying the same thing, but it wasn't starting. I managed to get in touch with my sysadmin who fixed the issue, but hasn't yet briefed me on the cause. I'll make sure to followup here. Thanks for your help!
    – evan3168
    Feb 26, 2014 at 19:41
5

Another consideration might be to ensure your tmpdir used for mysql has enough disk space and required permission.

In addition, for windows users: consider using front slash (/) as against back slash (\) for your tmpdir path

2
  • 1
    Thank god! I fought with this forever, I use SSD Caching and MUST specify the Windows tmpdir! May 15, 2015 at 1:50
  • 1
    Double back slash can also be used, since a single one is used as an escape character. Feb 13, 2016 at 19:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.