Mysql 服务无法启动,InnoDB init 函数错误

2021-12-05 00:00:00 database mysql wordpress innodb

今晚似乎不知从何而来,我的 wordpress 网站宕机了,我已经将其追溯到 mysql 的问题.Mysql 不会在服务器上启动,因为它一直失败.

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

我试过谷歌搜索并在 Stack Overflow 上查看这里,但除了删除 ipdata1 和日志文件之外,我似乎找不到很多解决方案,正如我所读的,这些文件不应该使用存储的数据来完成,因为它会弄乱我的桌子.

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.

这是在 NGINX CentOS 6 服务器上.

This is on an NGINX CentOS 6 server.

有什么想法吗?感谢您的帮助!

Any ideas? I appreciate the help!

推荐答案

另一个考虑可能是确保用于 mysql 的 tmpdir 有足够的磁盘空间和所需的权限.

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

另外,对于windows用户:考虑使用前斜线(/)而不是反斜线() 用于您的 tmpdir 路径

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

相关文章