OpenVZ MySQL InnoDB不会启动

我有一个4GB内存的OpenVZ服务器,并试图在几个发行版(Ubuntu 12.04 64Bit,Ubuntu 12.10 64Bit,Debian 7 64Bit)上安装MySQL,我总是得到相同的错误:

130718 6:57:27 [Note] Plugin 'FEDERATED' is disabled. 130718 6:57:27 InnoDB: The InnoDB memory heap is disabled 130718 6:57:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins 130718 6:57:27 InnoDB: Compressed tables use zlib 1.2.7 130718 6:57:27 InnoDB: Using Linux native AIO 130718 6:57: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. 130718 6:57:29 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 130718 6:57:29 InnoDB: Fatal error: cannot initialize AIO sub-system 130718 6:57:29 [ERROR] Plugin 'InnoDB' init function returned error. 130718 6:57:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 130718 6:57:29 [ERROR] Unknown/unsupported storage engine: InnoDB 130718 6:57:29 [ERROR] Aborting 

Ubuntu 12.04 64位除外,但我想用一个更新的版本。

我已经尝试在my.cnf中设置innodb_use_native_aio = 0 ,但是这没有帮助。 我会非常gratefull如果有人可以帮助我这个问题:)

由于这是OpenVZ®内核,因此您可能会遇到一些您没有正确设置的限制。 尝试:

 cat /proc/user_beancounters 

并检查一些行是否具有非零failcnt 。 适当调整以解决问题。

另一件事是简单地插入到VE中,例如:

 chroot /vz/root/1064 /bin/bash 

并尝试直接从那里启动mysqld ,看看它是否与OpenVZ®相关。 让我们知道你是否需要进一步的build议。

根据这个有两个解决scheme:

  • 在mysqld部分添加my.cnf部分innodb_use_native_aio = 0

要么

  • echo 65536> / proc / sys / fs / aio-max-nr

编辑你的my.cnf

 ignore_builtin_innodb default_storage_engine=MyISAM 

你也可以添加:

 skip-innodb 

我认为更多的软件与旧的MyISAM兼容。 这是运行基本configuration的定制Debian 7内核的工作。 被警告我没有在生产环境中testing过这个!