欢迎来到云服务器

Directadmin Linux面板

InnoDB:警告:io_setup()与EAGAIN失败。在放弃之前会做5次尝试。

如果mysqld不能启动,并且你检查你的mysql错误日志,例如:

cd /var/lib/mysql
tail -n 200 `hostname`.err>("cd /home/mysql" for Debian or FreeBSD)

and you find this error somewhere in it:

131201 19:22:27 InnoDB: Using Linux native AIO
131201 19:22:27  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.
131201 19:22:30  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
131201 19:22:30 InnoDB: Fatal error: cannot initialize AIO sub-system

那么解决方法是添加:

innodb_use_native_aio = 0

到/etc/my.cnf文件的[mysqld]部分。
 
如果这是全新安装(尚无数据),则可能需要重新安装my.cnf设置的mysql

cd /usr/local/directadmin/scripts
./mysql.sh pass1 da_admin pass2

pass1和pass2可以设置为你想要的任何密码。 pass1将是root的mysql密码,pass2将是da_admin的mysql密码。

另一个报道的解决方案是增加你的内核设置:
/ proc/ SYS/ FS/ AIO-MAX-NR
腾讯云代理

Copyright © 2003-2021 MFISP.COM. 国外vps服务器租用 梦飞云服务器租用 版权所有 粤ICP备11019662号