Today I wanted to install (on a new VPS with new OS) a MySQL server.

I used this command:

apt-get install mysql-server mysql-common mysql-client-5.5

I tried with Debian 7 (x64 and x86) and Ubuntu 13.04 (x64 and x86).

Every time I got this error message:

140223  9:37:33 [Warning] Using unique option prefix key_buffer instead of key_b
uffer_size is deprecated and will be removed in a future release. Please use the
 full name instead.
140223  9:37:33 [Warning] Using unique option prefix myisam-recover instead of m
yisam-recover-options is deprecated and will be removed in a future release. Ple
ase use the full name instead.
140223  9:37:33 [Note] Plugin 'FEDERATED' is disabled.
140223  9:37:33 InnoDB: The InnoDB memory heap is disabled
140223  9:37:33 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140223  9:37:33 InnoDB: Compressed tables use zlib 1.2.7
140223  9:37:33 InnoDB: Using Linux native AIO
140223  9:37:33  InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 att
empts 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.

A video in which I'm trying to install Ubuntu: http://youtu.be/nULSfa0xZdU

up vote 2 down vote accepted

Disabling via my.cnf

This sounds like your issue, titled: InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up..

excerpt

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

then the solution would be to add:

  innodb_use_native_aio = 0

to the [mysqld] section of your /etc/my.cnf file.

Increasing the aio-max-nr

Also you might be able to increase the kernel setting via:

$ cat /proc/sys/fs/aio-max-nr
1048576

Kernel settings such as this can be overridden using the sysctl command:

$ sudo sysctl -a | grep aio
fs.aio-max-nr = 1048576
fs.aio-nr = 0

$ sysctl -w fs.aio-max-nr=200000
  • 1
    adding innodb_use_native_aio = 0 to the mysqld section worked for me with, didnt have to do anything else – Hayden Thring Jan 30 '15 at 22:44
  • But raising the fs.aio-max-nr setting is actually a better solution, because it allows AIO to keep working. InnoDB uses AIO for a reason, disabling it probably hurts performance. – qris Jun 1 '16 at 12:13

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.