這是我使用的:
lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
uname -r
5.10.102.1-microsoft-standard-WSL2
Operating system
Windows 11 Pro
* version
21H2
* build
22000.708
* experience
Windows Feature Experience Pack 1000.22000.708.0.
以下是輸出:
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.
注意 中的日期error.log,這是一些較舊的錯誤。與此無關。我檢查了error.log重新安裝,它是空的,仍然無法啟動。
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
該設定已經運行了幾個月,沒有出現任何問題。我重新啟動了我的電腦,安裝了一個 Windows 更新*,現在我無法再啟動 mariadb。
這是什么問題,為什么會突然發生?
* 如果相關,這是 Windows 更新:
Update for Windows Security platform - KB5007651 (Version 1.0.2109.27002)
更新說明
更新
剛剛對我系統上的所有 Ubuntu 和 WSL 進行了完全清除/卸載。
然后我按照此處的指導進行了分步安裝:https ://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support#1-overview
然后我安裝了 MariaDB sudo apt install mariadb-server。
當我做
sudo service mariadb start
我再次收到 [FAIL],所以它也發生在全新安裝上。這一次,Ubuntu 上的任何地方都沒有日志。
對于那些要求“完整崩潰日志”的人來說——error.log我所擁有的兩行就是全部了。
對于那些問的人,這是我的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/
更新#2
我已經發布了一個有效的答案。簡而言之,這是 WSL 問題。
uj5u.com熱心網友回復:
這些訊息表明正在使用該libaio介面(而不是較新的io_uring)。在那個介面中,至少在普通的 Linux 內核上,io_setup()系統呼叫可能會失敗,導致回退到模擬的異步 I/O ( innodb_use_native_aio=0)。
恢復失敗可能是由MariaDB Server 10.5 中的MDEV-12353引入的錯誤MDEV-28731引起的。
uj5u.com熱心網友回復:
我的兄弟在 Ubuntu WSL 中發現了一個 github 問題,該問題與 MySQL 產生了相同的 AIO 錯誤。
這對我有用:
sudo apt remove --purge *mysql*
sudo apt remove --purge *mariadb*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt autoremove
sudo apt autoclean
請注意我在 OP 中的編輯,我完全重新安裝了 WSL 和 Ubuntu,因此它在全新安裝時也不斷發生。
另請注意,這完全清除了我擁有的所有資料。
簡而言之,這是 WSL 問題,而不是 MariaDB 的問題。
github上的問題:
- https://github.com/microsoft/WSL/issues/3631#issuecomment-1145856044
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/487028.html
