mysql-server 在设置密码时挂起

mysql-server 在设置密码时挂起

每次我尝试安装时mysql-server它都会挂在这个屏幕上

在此处输入图片描述

这是不输入密码的情况,但当我输入密码后,按“确定”后它就挂在这个屏幕上

在此处输入图片描述

我尝试了很多解决方案,即完全卸载并重新安装,但都没有用。安装是在 root 用户下完成的。

syslog

Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:25 [Note] /usr/sbin/mysqld (mysqld 5.5.44-0ubuntu0.14.04.1) starting as process 16893 ...
Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:25 [Note] Plugin 'FEDERATED' is disabled.
Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:25 InnoDB: The InnoDB memory heap is disabled
Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:25 InnoDB: Compressed tables use zlib 1.2.8
Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:25 InnoDB: Using Linux native AIO
Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:25  InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
Jul 30 12:07:25 3877-5708-4831 mysqld_safe[16894]: InnoDB: Warning: io_setup() attempt 1 failed.
Jul 30 12:07:26 3877-5708-4831 mysqld_safe[16894]: InnoDB: Warning: io_setup() attempt 2 failed.
Jul 30 12:07:26 3877-5708-4831 mysqld_safe[16894]: InnoDB: Warning: io_setup() attempt 3 failed.
Jul 30 12:07:27 3877-5708-4831 mysqld_safe[16894]: InnoDB: Warning: io_setup() attempt 4 failed.
Jul 30 12:07:27 3877-5708-4831 mysqld_safe[16894]: InnoDB: Warning: io_setup() attempt 5 failed.
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:28  InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:28 InnoDB: Fatal error: cannot initialize AIO sub-system
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:28 [ERROR] Plugin 'InnoDB' init function returned error.
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:28 [ERROR] Unknown/unsupported storage engine: InnoDB
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:28 [ERROR] Aborting
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 
Jul 30 12:07:28 3877-5708-4831 mysqld_safe[16894]: 150730 12:07:28 [Note] /usr/sbin/mysqld: Shutdown complete

因此,我很确定是 InnoDB 导致了错误,但是我该如何修复错误并使其顺利安装?

答案1

/etc/my.cnf通过在安装 MySQL 之前创建仅包含以下内容来修复

[mysqld]
innodb_use_native_aio = 0

来源

相关内容