MySQL is not starting/working on Debian 6 + DirectAdmin


I just delivered a brand new server with Debian Squeeze + DirectAdmin, I have got no errors while installing DirectAdmin, but after the installation I noticed that mysql was not running.

After some debugging I found the following error:

110530 22:59:40 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
110530 22:59:40 mysqld_safe mysqld from pid file /usr/local/mysql/data/server.pid ended

The mysql error log is hold in /home/mysql/:

# cat /home/mysql/*.local.err

The solution is simple, some packages needs to be installed:

# apt-get install libaio1 libaio-dev

Try to start mysql again, it should work, enjoy!