我用的是:
lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
uname -r
5.10.102.1-microsoft-standard-WSL2Operating 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.2sudo 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这个设置已经运行了几个月了,没有问题。我重新启动了我的PC,有了一个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
我再次失败,所以它也发生在一个新的安装。这一次,Ubuntu上任何地方都没有日志。
对于那些要求提供“完整的崩溃日志”-the的人来说,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/UPDATE#2
我贴出了一个关于什么起作用的答案。简而言之,这是WSL问题。
发布于 2022-06-03 11:25:10
我哥哥在Ubuntu中发现了一个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问题:
发布于 2022-06-03 06:27:44
消息表明正在使用libaio接口(相对于较新的io_uring)。在该接口中,至少在普通Linux内核上,io_setup()系统调用可能失败,导致出现模拟异步I/O (innodb_use_native_aio=0)的倒退。
恢复失败可能是由MDEV 12353在MariaDB服务器10.5中引入的错误MariaDB解释的。
https://stackoverflow.com/questions/72474571
复制相似问题