[MySQL FAQ]系列 -- 新手必看:一步到位之InnoDB

本文详细解析了InnoDB引擎的核心特性和优势,提供了优化配置的实用技巧,帮助开发者快速掌握并高效利用InnoDB,提升数据库性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

作/译者:叶金荣(imysql#imysql.com>),来源:http://imysql.com,欢迎转载。

前言:MySQL发展到今天,InnoDB引擎已经作为绝对的主力,除了像大数据量分析等比较特殊领域需求外,它适用于众多场景。然而,仍有不少开发者还在“执迷不悟”的使用MyISAM引擎,觉得对InnoDB无法把握好,还是MyISAM简单省事,还能支持快速COUNT(*)。本文是由于最近几天帮忙处理discuz论坛有感而发,希望能对广大开发者有帮助。

1. 快速认识InnoDB
InnoDB是MySQL下使用最广泛的引擎,它是基于MySQL的高可扩展性和高性能存储引擎,从5.5版本开始,它已经成为了默认引擎。
InnODB引擎支持众多特性:

a) 支持ACID,简单地说就是支持事务完整性、一致性; 
b) 支持行锁,以及类似ORACLE的一致性读,多用户并发;
c) 独有的聚集索引主键设计方式,可大幅提升并发读写性能;
d) 支持外键;
e) 支持崩溃数据自修复;

InnoDB有这么多特性,比MyISAM来的优秀多了,还犹豫什么,果断的切换到InnoDB引擎吧 :)

2. 修改InnoDB配置选项
可以选择官方版本,或者Percona的分支,如果不知道在哪下载,就google吧。
安装完MySQL后,需要适当修改下my.cnf配置文件,针对InnoDB相关的选项做一些调整,才能较好的运行InnoDB。
相关的选项有:

#InnoDB存储数据字典、内部数据结构的缓冲池,16MB 已经足够大了。
innodb_additional_mem_pool_size = 16M

#InnoDB用于缓存数据、索引、锁、插入缓冲、数据字典等
#如果是专用的DB服务器,且以InnoDB引擎为主的场景,通常可设置物理内存的50%
#如果是非专用DB服务器,可以先尝试设置成内存的1/4,如果有问题再调整
#默认值是8M,非常坑X,这也是导致很多人觉得InnoDB不如MyISAM好用的缘故
innodb_buffer_pool_size = 4G

#InnoDB共享表空间初始化大小,默认是 10MB,也非常坑X,改成 1GB,并且自动扩展
innodb_data_file_path = ibdata1:1G:autoextend

#如果不了解本选项,建议设置为1,能较好保护数据可靠性,对性能有一定影响,但可控
innodb_flush_log_at_trx_commit = 1

#InnoDB的log buffer,通常设置为 64MB 就足够了
innodb_log_buffer_size = 64M

#InnoDB redo log大小,通常设置256MB 就足够了
innodb_log_file_size = 256M

#InnoDB redo log文件组,通常设置为 2 就足够了
innodb_log_files_in_group = 2

#启用InnoDB的独立表空间模式,便于管理
innodb_file_per_table = 1

#启用InnoDB的status file,便于管理员查看以及监控等
innodb_status_file = 1

#设置事务隔离级别为 READ-COMMITED,提高事务效率,通常都满足事务一致性要求
transaction_isolation = READ-COMMITTED 

在这里,其他配置选项也需要注意:

#设置最大并发连接数,如果前端程序是PHP,可适当加大,但不可过大
#如果前端程序采用连接池,可适当调小,避免连接数过大
max_connections = 60

#最大连接错误次数,可适当加大,防止频繁连接错误后,前端host被mysql拒绝掉
max_connect_errors = 100000

#设置慢查询阀值,建议设置最小的 1 秒
long_query_time = 1

#设置临时表最大值,这是每次连接都会分配,不宜设置过大 max_heap_table_size 和 tmp_table_size 要设置一样大
max_heap_table_size = 96M
tmp_table_size = 96M

#每个连接都会分配的一些排序、连接等缓冲,一般设置为 2MB 就足够了
sort_buffer_size = 2M
join_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 2M

#建议关闭query cache,有些时候对性能反而是一种损害
query_cache_size = 0

#如果是以InnoDB引擎为主的DB,专用于MyISAM引擎的 key_buffer_size 可以设置较小,8MB 已足够
#如果是以MyISAM引擎为主,可设置较大,但不能超过4G
#在这里,强烈建议不使用MyISAM引擎,默认都是用InnoDB引擎
key_buffer_size = 8M

#设置连接超时阀值,如果前端程序采用短连接,建议缩短这2个值
#如果前端程序采用长连接,可直接注释掉这两个选项,是用默认配置(8小时)
interactive_timeout = 120
wait_timeout = 120

3. 开始使用InnoDB引擎
修改完配置文件,即可启动MySQL。启动完毕后,在MySQL的datadir目录下,若产生以下几个文件,则表示应该可以使用InnoDB引擎了。

-rw-rw---- 1 mysql mysql 1.0G Sep 21 17:25 ibdata1
-rw-rw---- 1 mysql mysql 256M Sep 21 17:25 ib_logfile0
-rw-rw---- 1 mysql mysql 256M Sep 21 10:50 ib_logfile1

登录MySQL后,执行命令,确认已启用InnoDB引擎:

(root:imysql.cn:Thu Oct 15 09:16:22 2009)[mysql]> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |

接下来创建一个InnoDB表:

(root:imysql.cn:Thu Oct 15 09:16:22 2009)[mysql]> 
CREATE TABLE my_innodb_talbe(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(20) NOT NULL DEFAULT '',
passwd VARCHAR(32) NOT NULL DEFAULT '',
PRIMARY KEY(id),
UNIQUE KEY `idx_name`(name)
) ENGINE = InnoDB;

有几个和MySQL(尤其是InnoDB引擎)数据表设计相关的建议,希望开发者朋友能遵循:

a) 所有InnoDB数据表都创建一个和业务无关的自增数字型作为主键,对保证性能很有帮助;
b) 杜绝使用text/blob,确实需要使用的,尽可能拆分出去成一个独立的表;
c) 时间戳建议使用 TIMESTAMP 类型存储;
d) IPV4 地址建议用 INT UNSIGNED 类型存储;
e) 性别等非是即非的逻辑,建议采用 TINYINT 存储,而不是 CHAR(1);
f) 存储较长文本内容时,建议采用JSON/BSON格式存储;
2012-08-04T13:34:48.100295Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 6020 2012-08-04T13:34:48.236300Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2012-08-04T13:35:07.144382Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2012-08-04T13:35:39.446231Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2012-08-04T13:36:01.826510Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 4016 2012-08-04T13:36:01.829510Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2012-08-04T13:36:01.830510Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\Data\ is unusable. You can remove all files that the server added to it. 2012-08-04T13:36:01.833510Z 0 [ERROR] [MY-010119] [Server] Aborting 2012-08-04T13:36:01.833512Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2012-08-04T13:50:50.554656Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 4652 2012-08-04T13:50:50.619657Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2012-08-04T13:50:50.814669Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2012-08-04T13:50:50.815669Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2012-08-04T13:50:50.829669Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2012-08-04T13:50:50.830669Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2012-08-04T13:50:50.830670Z 0 [ERROR] [MY-010119] [Server] Aborting 2012-08-04T13:50:50.831674Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2012-08-04T13:51:39.728468Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 2836 2012-08-04T13:51:39.749467Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2012-08-04T13:51:39.933478Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2012-08-04T13:51:39.934478Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2012-08-04T13:51:39.938478Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2012-08-04T13:51:39.939478Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2012-08-04T13:51:39.939479Z 0 [ERROR] [MY-010119] [Server] Aborting 2012-08-04T13:51:39.940482Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:26:32.458715Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2025-06-26T11:26:32.474315Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2025-06-26T11:26:32.474315Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2025-06-26T11:26:32.474315Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2025-06-26T11:26:32.786315Z 0 [Note] mysqld (mysqld 5.7.31) starting as process 6620 ... 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: Uses event mutexes 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2025-06-26T11:26:33.113915Z 0 [Note] InnoDB: Number of pools: 1 2025-06-26T11:26:33.129515Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2025-06-26T11:26:33.191915Z 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M 2025-06-26T11:26:33.191915Z 0 [Note] InnoDB: Completed initialization of buffer pool 2025-06-26T11:26:33.332315Z 0 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:26:33.332315Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2025-06-26T11:26:33.550715Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2025-06-26T11:26:33.550715Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2025-06-26T11:26:33.550715Z 0 [ERROR] Failed to initialize builtin plugins. 2025-06-26T11:26:33.550715Z 0 [ERROR] Aborting 2025-06-26T11:26:33.550715Z 0 [Note] Binlog end 2025-06-26T11:26:33.566315Z 0 [Note] Shutting down plugin 'CSV' 2025-06-26T11:26:33.566315Z 0 [Note] mysqld: Shutdown complete 2025-06-26T11:29:24.760715Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2025-06-26T11:29:24.760715Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2025-06-26T11:29:24.760715Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2025-06-26T11:29:24.760715Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2025-06-26T11:29:24.760715Z 0 [Note] MySQL57 (mysqld 5.7.31) starting as process 6856 ... 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Uses event mutexes 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Number of pools: 1 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2025-06-26T11:29:24.791915Z 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M 2025-06-26T11:29:24.807515Z 0 [Note] InnoDB: Completed initialization of buffer pool 2025-06-26T11:29:25.072715Z 0 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:29:25.072715Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2025-06-26T11:29:25.400315Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2025-06-26T11:29:25.400315Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2025-06-26T11:29:25.400315Z 0 [ERROR] Failed to initialize builtin plugins. 2025-06-26T11:29:25.400315Z 0 [ERROR] Aborting 2025-06-26T11:29:25.400315Z 0 [Note] Binlog end 2025-06-26T11:29:25.400315Z 0 [Note] Shutting down plugin 'CSV' 2025-06-26T11:29:25.400315Z 0 [Note] MySQL57: Shutdown complete 2025-06-26T11:30:11.679515Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2025-06-26T11:30:11.679515Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2025-06-26T11:30:11.679515Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2025-06-26T11:30:11.679515Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2025-06-26T11:30:11.680515Z 0 [Note] MySQL57 (mysqld 5.7.31) starting as process 1328 ... 2025-06-26T11:30:11.696515Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2025-06-26T11:30:11.697515Z 0 [Note] InnoDB: Uses event mutexes 2025-06-26T11:30:11.698515Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2025-06-26T11:30:11.698515Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2025-06-26T11:30:11.699515Z 0 [Note] InnoDB: Number of pools: 1 2025-06-26T11:30:11.700515Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2025-06-26T11:30:11.707515Z 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M 2025-06-26T11:30:11.727515Z 0 [Note] InnoDB: Completed initialization of buffer pool 2025-06-26T11:30:11.785515Z 0 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:30:11.786515Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2025-06-26T11:30:11.987515Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2025-06-26T11:30:11.987515Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2025-06-26T11:30:11.988515Z 0 [ERROR] Failed to initialize builtin plugins. 2025-06-26T11:30:11.988515Z 0 [ERROR] Aborting 2025-06-26T11:30:11.989515Z 0 [Note] Binlog end 2025-06-26T11:30:11.989515Z 0 [Note] Shutting down plugin 'CSV' 2025-06-26T11:30:11.990515Z 0 [Note] MySQL57: Shutdown complete 2025-06-26T11:32:29.799516Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6768 2025-06-26T11:32:29.932515Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:32:30.217515Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:32:30.218515Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:32:30.222515Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:32:30.223515Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:32:30.223516Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:32:30.225515Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:33:11.431517Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 5844 2025-06-26T11:33:11.453515Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:33:11.646515Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:33:11.647515Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:33:11.651515Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:33:11.652515Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:33:11.652516Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:33:11.653519Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:37:44.455517Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 5416 2025-06-26T11:37:44.459515Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2025-06-26T11:37:44.460515Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\data\ is unusable. You can remove all files that the server added to it. 2025-06-26T11:37:44.477515Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:37:44.477517Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:37:47.993517Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 3268 2025-06-26T11:37:47.996515Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2025-06-26T11:37:47.997515Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\data\ is unusable. You can remove all files that the server added to it. 2025-06-26T11:37:47.999515Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:37:48.000516Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:44:45.414317Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 7160 2025-06-26T11:44:45.417315Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2025-06-26T11:44:45.418315Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\data\ is unusable. You can remove all files that the server added to it. 2025-06-26T11:44:45.421315Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:44:45.421317Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:50:18.940316Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 2960 2025-06-26T11:50:19.707315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:50:20.882315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:50:20.889315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:50:20.933315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:50:20.943315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:50:20.943316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:50:21.013315Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:54:54.948317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 5396 2025-06-26T11:54:55.006315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:54:55.988315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:54:56.000315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:54:56.044315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:54:56.054315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:54:56.055315Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:54:56.124315Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:54:59.535315Z 0 [ERROR] [MY-010083] [Server] --verbose is for use with --help; did you mean --log-error-verbosity? 2025-06-26T11:54:59.536316Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6260 2025-06-26T11:54:59.557315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:54:59.763315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:54:59.764315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:54:59.768315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:54:59.769315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:54:59.769316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:54:59.770320Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:55:49.378317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6884 2025-06-26T11:55:49.412315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:55:49.607315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:55:49.608315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:55:49.612315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:55:49.613315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:55:49.613316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:55:49.614319Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:59:23.848317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6500 2025-06-26T11:59:23.870315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:59:24.138315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:59:24.145315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:59:24.190315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:59:24.199315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:59:24.200315Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:59:24.270315Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T12:00:11.464315Z 0 [ERROR] [MY-010083] [Server] --verbose is for use with --help; did you mean --log-error-verbosity? 2025-06-26T12:00:11.464318Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 5528 2025-06-26T12:00:11.506315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T12:00:11.712315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T12:00:11.713315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T12:00:11.717315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T12:00:11.718315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T12:00:11.718316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T12:00:11.719319Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T12:00:48.273317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6076 2025-06-26T12:00:48.312315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T12:00:48.525315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T12:00:48.526315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T12:00:48.530315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T12:00:48.531315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T12:00:48.531316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T12:00:48.532320Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T12:02:01.665317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 5008 2025-06-26T12:02:01.715315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T12:02:01.927315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T12:02:01.928315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T12:02:01.932315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T12:02:01.933315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T12:02:01.933316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T12:02:01.934320Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T08:49:33.665262Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 1656 2025-06-27T08:49:38.251669Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T08:49:38.782070Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T08:49:38.813270Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T08:49:38.875670Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T08:49:38.891270Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T08:49:38.891271Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T08:49:38.922470Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T09:23:59.010941Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 5100 2025-06-27T09:24:00.153005Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T09:24:00.765040Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T09:24:00.776041Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T09:24:00.802042Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T09:24:00.810043Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T09:24:00.811043Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T09:24:00.851045Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T10:45:57.915815Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 3404 2025-06-27T10:45:58.574852Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T10:45:59.277892Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T10:45:59.289893Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T10:45:59.315895Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T10:45:59.323895Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T10:45:59.323896Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T10:45:59.363897Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T10:47:26.056858Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 4556 2025-06-27T10:47:26.083857Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T10:47:26.411876Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T10:47:26.412876Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T10:47:26.416876Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T10:47:26.417877Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T10:47:26.417878Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T10:47:26.418882Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL.
最新发布
06-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值