Ubuntu 22.04. "Starting MariaDB database server mariadbd [fail]"
Here's what I use:
lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy
uname -r 220.127.116.11-microsoft-standard-WSL2
Operating system Windows 11 Pro * version 21H2 * build 22000.708 * experience Windows Feature Experience Pack 1000.22000.708.0.
Here are the outputs:
sudo mariadb --version * mariadb Ver 15.1 Distrib 10.6.7-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
sudo service mariadb restart * Stopping MariaDB database server mariadbd [ OK ] * Starting MariaDB database server [fail]
sudo service mariadb status * MariaDB is stopped.
nano /var/log/mysql/error.log * 2022-03-29 15:43:59 0 [Warning] InnoDB: Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB. * 2022-03-29 15:43:59 0 [Warning] InnoDB: Linux Native AIO disabled.
sudo mysqld --verbose --user root * 2022-06-02 13:27:16 0 [Note] mysqld (server 10.6.7-MariaDB-1:10.6.7+maria~focal) starting as process 1445 ... * 2022-06-02 13:27:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 * 2022-06-02 13:27:16 0 [Note] InnoDB: Number of pools: 1 * 2022-06-02 13:27:16 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions * 2022-06-02 13:27:16 0 [Note] InnoDB: Using Linux native AIO * 2022-06-02 13:27:16 0 [Note] InnoDB: Initializing buffer pool, total size = 4294967296, chunk size = 134217728 * 2022-06-02 13:27:16 0 [Note] InnoDB: Completed initialization of buffer pool * 2022-06-02 13:27:16 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=10162222816,10254949185 * 2022-06-02 13:27:16 0 [ERROR] InnoDB: Missing FILE_CREATE, FILE_DELETE or FILE_MODIFY before FILE_CHECKPOINT for tablespace 724 * 2022-06-02 13:27:16 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption * 2022-06-02 13:27:16 0 [Note] InnoDB: Starting shutdown... * 2022-06-02 13:27:17 0 [ERROR] Plugin 'InnoDB' init function returned error. * 2022-06-02 13:27:17 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. * 2022-06-02 13:27:17 0 [Note] Plugin 'FEEDBACK' is disabled. * 2022-06-02 13:27:17 0 [ERROR] Unknown/unsupported storage engine: InnoDB * 2022-06-02 13:27:17 0 [ERROR] Aborting
The setup has been working without issues for months now. I restarted my PC, had one Windows Update* and now I cannot start the mariadb anymore.
What is this issue and why did it suddenly happen?
If it's relevant, this is the Windows update:
Update for Windows Security platform - KB5007651 (Version 1.0.2109.27002)
Just did a complete purge/uninstall of everything Ubuntu and WSL on my system.
Then I did a step-by-step installation as guided here: https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support#1-overview
Then I installed the MariaDB (sudo apt install mariadb-server).
When I do the
sudo service mariadb start
I get the [FAIL] again, so it's happening on a fresh installation as well. This time, there are no logs anywhere on the Ubuntu. For those who asked for the "full crash log" the two lines in the `error.log` I had was all there was.
For those who asked, here's my `my.cnf`:
# The MariaDB configuration file # # The MariaDB/MySQL tools read configuration files in the following order: # 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read. # 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults, # 2. "/etc/mysql/conf.d/*.cnf" to set global options. # 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options. # 4. "~/.my.cnf" to set user-specific options. # # If the same option is defined multiple times, the last one will apply. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/ # # This group is read both by the client and the server # use it for options that affect everything # [client-server] # Port or socket location where to connect # port = 3306 socket = /run/mysqld/mysqld.sock # Import all .cnf files from configuration directory !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mariadb.conf.d/
My brother has found a github issue with Ubuntu WSL that produced the same AIO error with MySQL.
Here is what worked for me:
sudo apt remove --purge *mysql* sudo apt remove --purge *mariadb* sudo rm -rf /etc/mysql /var/lib/mysql sudo apt autoremove sudo apt autoclean
Notice my edit in the OP that I did a complete reinstall of WSL and Ubuntu, so it kept happening on the fresh install as well.
Also notice that this completely purged every data I had.
In short, this is WSL issue, not an issue with MariaDB.
The issue on github: