![无法启动/停止/重新启动服务:MySQL Daemon 启动失败](https://linux22.com/image/636643/%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%2F%E5%81%9C%E6%AD%A2%2F%E9%87%8D%E6%96%B0%E5%90%AF%E5%8A%A8%E6%9C%8D%E5%8A%A1%EF%BC%9AMySQL%20Daemon%20%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5.png)
当尝试重新启动 mysqld 服务时,我收到此错误:无法启动/停止/重新启动服务:MySQL 守护进程无法启动。
有人知道如何解决吗?我正在运行 centos 6.5,我发现缺少文件:/var/lib/mysql/mysql.sock
mysql 错误日志
140707 12:09:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140707 12:09:29 [Note] libgovernor.so not found
140707 12:09:29 [Warning] option 'innodb-buffer-pool-size': signed value 2097152 adjusted to 5242880
140707 12:09:29 [Warning] option 'innodb-additional-mem-pool-size': signed value 512000 adjusted to 524288
140707 12:09:29 [Note] Plugin 'FEDERATED' is disabled.
140707 12:09:29 InnoDB: The InnoDB memory heap is disabled
140707 12:09:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140707 12:09:29 InnoDB: Compressed tables use zlib 1.2.3
140707 12:09:29 InnoDB: Using Linux native AIO
140707 12:09:29 InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
InnoDB: Warning: io_setup() attempt 1 failed.
InnoDB: Warning: io_setup() attempt 2 failed.
InnoDB: Warning: io_setup() attempt 3 failed.
InnoDB: Warning: io_setup() attempt 4 failed.
InnoDB: Warning: io_setup() attempt 5 failed.
140707 12:09:31 InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
140707 12:09:31 InnoDB: Fatal error: cannot initialize AIO sub-system
140707 12:09:31 [ERROR] Plugin 'InnoDB' init function returned error.
140707 12:09:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140707 12:09:31 [ERROR] Unknown/unsupported storage engine: InnoDB
140707 12:09:31 [ERROR] Aborting
140707 12:09:31 [Note] /usr/libexec/mysqld: Shutdown complete
140707 12:09:31 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
谢谢您的回答,但我需要从备份中恢复它
答案1
这似乎是无法设置 AIO 的问题。可能是因为:
- 通过配额进行空间限制:您是否为启动 MySQL 的用户设置了配额?尝试查看
quota -s
- 高清空间限制:也许您的空间不足。查看
df -h
是否有驱动器接近容量上限。 - 权限问题:您尝试重新启动服务的用户是否具有适当的权限?
- 配置更改:您最近更改过配置吗?作为测试,请尝试在 中恢复您的配置
my.cnf
。您可能还想尝试使用 禁用 AIO,innodb_use_native_aio = 0
但这实际上只是一种解决方法。 - 数据库损坏:我还没有看到由于数据库损坏而弹出此错误,但我认为这是一种可能性。
希望这可以帮助。