Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Native AIO interface is not supported on this platform. #3631

Closed
sgnd opened this issue Oct 23, 2018 · 27 comments
Closed

Linux Native AIO interface is not supported on this platform. #3631

sgnd opened this issue Oct 23, 2018 · 27 comments

Comments

@sgnd
Copy link

sgnd commented Oct 23, 2018

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

@marveloo
Copy link

marveloo commented Nov 6, 2018

I get exactly the same thing on a fresh Ubuntu installation when I'm installing MySQL 8.0 using their official guide: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Steps I did as root:

apt-get update
apt-get upgrade
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
dpkg -i mysql-apt-config_0.8.10-1_all.deb
apt-get update
apt-get install mysql-server

When asked I chose default configuration options and set no password for MySQL root user.

And here goes:

root@DESKTOP:~# service mysql start
mysql: unrecognized service
root@DESKTOP:~# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

And the content of /var/log/mysql/error.log:

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.

@ghost
Copy link

ghost commented Nov 17, 2018

I get exactly the same thing on a fresh Ubuntu installation when I'm installing MySQL 8.0 using their official guide: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Steps I did as root:

apt-get update
apt-get upgrade
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
dpkg -i mysql-apt-config_0.8.10-1_all.deb
apt-get update
apt-get install mysql-server

When asked I chose default configuration options and set no password for MySQL root user.

And here goes:

root@DESKTOP:~# service mysql start
mysql: unrecognized service
root@DESKTOP:~# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

And the content of /var/log/mysql/error.log:

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.

same issue and repro
And it happens on both ubuntu 16.04 and 18.04

@ghost
Copy link

ghost commented Nov 19, 2018

@therealkenc please reopen it, the issue does exists

@therealkenc
Copy link
Collaborator

please reopen it, the issue does exists

You can start it back up with a new issue submission following the template if you like. Given it looks like the postinstall script doesn't take, resulting in a "unrecognized service" error (more or less analogous to this), you likely need to start the server directly. If you still find no joy after starting the server manually, you'll want straces off the client and the server.

IIRC mysql worked for me using Ubuntu's packaged version (which as with Mongo tends to be more tolerant of our systemd situation). I may recall incorrectly, mind you. It's been a month since I looked.

So please use this form and tell us, concisely but precisely, what's up. Please fill out ALL THE FIELDS! Issues with missing or incomplete issue templates will be closed.

@yztxwd
Copy link

yztxwd commented Jan 8, 2019

Face the same issue, I install mysql as the quick guide on mysql official website. I use a linux subsystem of Windows 10, does anybody know how to fix it?

@jw-redpanda
Copy link

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!

@jqjk
Copy link

jqjk commented Feb 25, 2019

Thank you @jw-redpanda.
In my environment, I solved the problem by deleting all mysql related packages in step 1.

sudo apt-get purge mysql-server mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-server mysql-community-server-core

@PendalF89
Copy link

@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.

@Ezequielcc1
Copy link

Ezequielcc1 commented Mar 28, 2019

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

@rjnfrazao
Copy link

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

@eric03742
Copy link

Thank you @jw-redpanda, your solution works for me.

@a22375
Copy link

a22375 commented May 29, 2019

In my case it works, if I start mysql with:

sudo /etc/init.d/mysql start

@csakai
Copy link

csakai commented Jun 3, 2019

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.

@Dealazer
Copy link

#WARNING#
Use the above solution by @jw-redpanda with precaution.
On Windows Ubuntu, you do not want to install the apt-file to get 8.x it does not work. You should already be running the default 5.x version or at least a higher version, do not install repositories.
First, check your version already installed or you might bust your DB. run:
sudo apt policy mysql-server
Does it tell you anything version 8? Maybe 5.x already.

The connection error is because you want to run first:
sudo service mysql start

If you get an error about InnoDB most likely it's because of the wrong version from another repository.

If then run:
mysql

@AllanChain
Copy link

AllanChain commented Feb 10, 2020

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

@aderchox
Copy link

Thank you @jw-redpanda it works very smoothly and WAAAY better than other answers elsewhere, however, two things I encountered are:
1_ I think the last two steps in 5 have to be done in place of each other (the last one should be done before its previous one). At least that was the case for me. I didn't get the 8.x as the candidate until I did the sudo apt-get update.
2_ the last step gives the long message:

The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.

But I don't think it's something as serious as the issues I was previously struggling with, so I'll probably fix this one as well soon.
Thanks once again.

@esamo
Copy link

esamo commented Sep 22, 2020

I had to remove everything from /var/lib/mysql/* which removes the data and settings but gets through Cannot upgrade server earlier than 5.7 to 8.0

@cferrante
Copy link

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 !

@sucicf1
Copy link

sucicf1 commented Nov 9, 2020

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

@pollyolly
Copy link

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.

This also works for me too.

@alanbueno
Copy link

if anyone's ended up here struggling with wix-embedded-mysql and for some reason can't change the mysql settings in your WSL distro or host unix system, you can just disable it through the custom mysqld setting .withServerVariable like:

.withServerVariable("innodb_use_native_aio", 0)

That option's only doable if you really don't care about InnoDB usage in your code though.

@Ravaelles
Copy link

Ravaelles commented Apr 26, 2022

Before Step 4 I had to remove existing apt config to make it work:

sudo apt-get purge mysql-apt-config
sudo apt-get update

Also: I had to use latest mysql version (wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb), otherwise I was getting expired gpg key errors.

@Delicious-Bacon
Copy link

Delicious-Bacon commented Jun 3, 2022

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

This is the only thing that worked for me for my MariaDB installation.

All the vague AIO errors started after this Windows Update:
Windows update

NOTE that I completely reinstalled WSL and Ubuntu on my Windows 11 machine and did a fresh install of MariaDB after I had this error, and the error did not go away after fresh installation. It could be some caching that breaks everything, since there was still something to --purge on a fresh Ubuntu install.

This issue is not supposed to be closed, it's still an issue.

@Delicious-Bacon
Copy link

Once again, after resetting everything, one ninja Windows update and MariaDB fails to start yet again.

image

So what now? Reinstall everything again?

@harshbakori
Copy link

Any updates on this?

@TodoshiTakato
Copy link

Yeah, still waiting for updates...

@profsam97
Copy link

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

Thanks man, this works on ubuntu 20.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests