7

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

1 Answer 1

7

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
3
  • 2
    adding innodb_use_native_aio = 0 to the mysqld section worked for me with, didnt have to do anything else Jan 30, 2015 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, 2016 at 12:13
  • 1
    Thank you innodb_use_native_aio = 0 helped me solve the problem :)
    – Soren
    May 13, 2020 at 7:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .