WSL: Linux Native AIO interface is not supported on this platform.

I found error if start mysql with sudo service mysql start display error mysql: unrecognized service. and I start mysql with sudo mysql start display error like this ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

error.log in Ubuntu 18.04.1 MySQL 8.0

2018-10-23T12:23:33.801806Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.13) initializing of server in progress as process 1020
2018-10-23T12:23:36.785621Z 1 [ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
2018-10-23T12:23:36.785957Z 1 [Warning] [MY-012654] [InnoDB] Linux Native AIO disabled.
2018-10-23T12:25:53.323016Z 5 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2018-10-23T12:27:00.566200Z 0 [System] [MY-013170] [Server] /usr/sbin/mysqld (mysqld 8.0.13) initializing of server has completed
2018-10-23T12:27:12.932369Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.13) starting as process 1068
2018-10-23T12:27:13.256879Z 1 [ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
2018-10-23T12:27:13.257193Z 1 [Warning] [MY-012654] [InnoDB] Linux Native AIO disabled.
2018-10-23T12:27:20.937943Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-10-23T12:27:21.225835Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/tmp' in the path is accessible to all OS users. Consider choosing a different directory.
2018-10-23T12:27:22.284645Z 6 [System] [MY-013172] [Server] Received SHUTDOWN from user boot. Shutting down mysqld (Version: 8.0.13).
2018-10-23T12:27:22.298362Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.13'  socket: '/tmp/tmp.zcoyarNRm3/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2018-10-23T12:27:25.601081Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.13)  MySQL Community Server - GPL.

Please help me to fix this

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 5
  • Comments: 27

Most upvoted comments

Direct installation of MySQL 8.x will not work on WSL, even after your have selected 8.x as the default install candidate. It has problem starting the server.

Steps below should work (tried out on few WSL instances):

  1. Remove MySQL 8.x: sudo apt-get purge mysql-server mysql-client sudo apt-get -y autoremove
  2. Change to MySQL 5.x candidate: sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb (if you don’t have it, wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb)
  3. Double check current apt policy of MySQL is 5.x: sudo apt policy mysql-server (it will show 5.x is the default candidate) sudo apt-get update
  4. Install MySQL 5.x sudo apt-get -y install mysql-server sudo service mysql start (this should work without error)
  5. Change to MySQL 8.x candidate sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb (select 8.x) sudo apt policy mysql-server (it will show 8.x is the default candidate) sudo apt-get update
  6. Install MySQL 8.x sudo apt-get -y install mysql-server
  7. Modify a script as there is a bug sudo vi /etc/init.d/mysql (search for a line “. /usr/share/mysql/mysql-helpers” and change it to “. /usr/share/mysql-8.0/mysql-helpers”)
  8. Upgrade system tables to MySQL 8.x sudo service mysql start (this should start without error) sudo mysql_upgrade -u root -p

Hope this also works for you!

########################################## TAHNKS YOU !!! IT WORK VERY WELL FOR ME ##########################################

In my case, I have manually upgraded WSL to Ubuntu 19.10, and mysql-apt-config_0.8.14-1_all.deb (only one which supports Ubuntu 19.10) has no 5.7 option 😢

But I fixed it by totally uninstall mysql (be carefull):

sudo apt remove --purge *mysql*
sudo apt remove --purge *mariadb*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt autoremove
sudo apt autoclean

and reinstall mysql, there seems no problem

I used @jw-redpanda 's solution but I still encountered issues. This was the error I encountered when I ran sudo service mysql start

[Server] unknown variable 'log-syslog=1'.

Did a quick google search for this error, and found this answer: https://dba.stackexchange.com/a/231103

I followed the advice, changing /etc/mysql/mysql.conf.d/mysqld_safe_syslog.cnf to:

[mysqld_safe]
#syslog

and it now works.

@jw-redpanda thanks for you solution, but it not working for me, i can’t find string “/usr/share/mysql/mysql-helpers” in /etc/init.d/mysql file.

Direct installation of MySQL 8.x will not work on WSL, even after your have selected 8.x as the default install candidate. It has problem starting the server.

Steps below should work (tried out on few WSL instances):

  1. Remove MySQL 8.x: sudo apt-get purge mysql-server mysql-client sudo apt-get -y autoremove
  2. Change to MySQL 5.x candidate: sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb (if you don’t have it, wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb)
  3. Double check current apt policy of MySQL is 5.x: sudo apt policy mysql-server (it will show 5.x is the default candidate) sudo apt-get update
  4. Install MySQL 5.x sudo apt-get -y install mysql-server sudo service mysql start (this should work without error)
  5. Change to MySQL 8.x candidate sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb (select 8.x) sudo apt policy mysql-server (it will show 8.x is the default candidate) sudo apt-get update
  6. Install MySQL 8.x sudo apt-get -y install mysql-server
  7. Modify a script as there is a bug sudo vi /etc/init.d/mysql (search for a line “. /usr/share/mysql/mysql-helpers” and change it to “. /usr/share/mysql-8.0/mysql-helpers”)
  8. Upgrade system tables to MySQL 8.x sudo service mysql start (this should start without error) sudo mysql_upgrade -u root -p

Hope this also works for you!

Only one small correction. You first need to run sudo apt-get update after that sudo apt policy mysql-server

Thanks for the instructions. They are helpfull

Using WSL and upgraded from Ubuntu 18.04 to 20.04.

sudo service mysql start

This had previously worked, but now failed and produced log error…

[InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.

…as described above by other users.

@csakai describes simple solution of…

changing /etc/mysql/mysql.conf.d/mysqld_safe_syslog.cnf to:

[mysqld_safe] #syslog

Seems to work for me. Thanks @csakai !

Thank you @jw-redpanda .

I was able to install the version 5.7. However, in my case the step 5. Change to MySQL 8.x candidate, the apt policy was still displaying as candidate version 5.7, although I selected 8.0 in previous step.

I have at least the version 5.7 installed so I can start playing around, later I will figure out how to migrate to 8.0