在Ubuntu桌面(我的PC,没有服务器)上运行sudo mysqld_safe --skip-grant-tables
后,出现以下错误:
2019-03-11T09:43:13.463024Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.15) MySQL Community Server - GPL.
2019-03-11T09:46:23.705247Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.15) starting as process 3141
2019-03-11T09:46:23.717873Z 1 [ERROR] [MY-012935] [InnoDB] Database upgrade cannot be accomplished in read-only mode.
2019-03-11T09:46:23.717884Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2019-03-11T09:46:23.717906Z 1 [ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine.
2019-03-11T09:46:23.718040Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2019-03-11T09:46:23.718101Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-03-11T09:46:23.718366Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.15) MySQL Community Server - GPL.
my.cnf
的外观如下:
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
innodb_force_recovery = 6
innodb_buffer_pool_size = 10M
innodb_buffer_pool_size = 10M
innodb_log_file_size = 1000M
我已经备份了包含重要数据的/var/lib/mysql
目录,但是我也想进行mysql dump。
如何以最小的方式启动mysql服务器,以便可以导出数据库?