关于安装mysql5.7系列,在安装过程中成功安装,却在net start mysql处失败数十次后,我终于在大致看懂日志的情况下百度到了救命稻草.
1.记录错误:
2020-06-29T13:59:54.335325Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-06-29T13:59:56.471585Z 0 [ERROR] InnoDB: Operating system error number 87 in a file operation.
2020-06-29T13:59:56.473855Z 0 [ERROR] InnoDB: File .\ib_logfile101: ‘aio write’ returned OS error 187. Cannot continue operation
2020-06-29T13:59:56.476128Z 0 [ERROR] InnoDB: Cannot continue operation.
2020-06-29T14:01:11.854559Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-06-29T14:01:11.854656Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2020-06-29T14:01:11.855129Z 0 [Note] MySQL (mysqld 5.7.30) starting as process 11164 …
2020-06-29T14:01:11.867122Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-06-29T14:01:11.867786Z 0 [Note] InnoDB: Uses event mutexes
2020-06-29T14:01:11.868182Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2020-06-29T14:01:11.868748Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-06-29T14:01:11.869572Z 0 [Note] InnoDB: Number of pools: 1
2020-06-29T14:01:11.870106Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2020-06-29T14:01:11.874212Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-06-29T14:01:11.884977Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-06-29T14:01:12.219338Z 0 [ERROR] InnoDB: Header page consists of zero bytes in datafile: .\ibdata1, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2020-06-29T14:01:12.222566Z 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile ‘.\ibdata1’ could not be found in the doublewrite buffer.
2020-06-29T14:01:12.224795Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2020-06-29T14:01:12.428399Z 0 [ERROR] Plugin ‘InnoDB’ init function returned error.
2020-06-29T14:01:12.429793Z 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2020-06-29T14:01:12.431115Z 0 [ERROR] Failed to initialize builtin plugins.
2020-06-29T14:01:12.432396Z 0 [ERROR] Aborting
2020-06-29T14:01:12.433177Z 0 [Note] Binlog end
2020-06-29T14:01:12.434133Z 0 [Note] Shutting down plugin ‘CSV’
2020-06-29T14:01:12.435961Z 0 [Note] MySQL: Shutdown complete
2.翻译;
2020-06-29T13:59:54.335325Z 0[警告]隐式默认值的时间戳已弃用。请使用–explicit\u defaults_for_timestamp server选项(有关详细信息,请参阅文档)。
2020-06-29T13:59:56.471585Z 0[错误]InnoDB:文件操作中的操作系统错误号87。
2020-06-29T13:59:56.473855Z 0[ERROR]InnoDB:File.\ib\u logfile101:'aio write’返回操作系统错误187。无法继续操作
2020-06-29T13:59:56.476128Z 0[错误]InnoDB:无法继续操作。
2020-06-29T14:01:11.854559Z 0[警告]隐式默认值的时间戳已弃用。请使用–explicit\u defaults_for_timestamp server选项(有关详细信息,请参阅文档)。
2020-06-29T14:01:11.854656Z 0[注]——secure file priv设置为空。与导入和导出数据相关的操作被禁用
2020-06-29T14:01:11.855129Z 0[注]MySQL(mysqld 5.7.30)以进程11164开始。。。
2020-06-29T14:01:11.867122Z 0[注]InnoDB:互斥锁和rw_锁使用Windows互锁功能
2020-06-29T14:01:11.867786Z 0[注]InnoDB:使用事件互斥
2020-06-29T14:01:11.868182Z 0[注]InnoDB:
2020-06-29T14:01:11.868748Z 0[注]InnoDB:压缩表使用zlib 1.2.11
2020-06-29T14:01:11.869572Z 0[注]InnoDB:池数:1
2020-06-29T14:01:11.870106Z 0[注]InnoDB:不使用CPU crc32指令
2020-06-29T14:01:11.874212Z 0[注]InnoDB:初始化缓冲池,总大小=128M,实例数=1,块大小=128M
2020-06-29T14:01:11.884977Z 0[注]InnoDB:缓冲池初始化完成
2020-06-29T14:01:12.219338Z 0[ERROR]InnoDB:头页由数据文件中的零字节组成:.\ibdata1,Space ID:0,Flags:0。请参考http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html如何解决这个问题。
2020-06-29T14:01:12.222566Z 0[ERROR]InnoDB:在doublewrite缓冲区中找不到数据文件“.\ibdata1”的损坏页[page id:space=0,page number=0]。
2020-06-29T14:01:12.224795Z 0[ERROR]InnoDB:插件初始化中止,错误数据结构损坏
2020-06-29T14:01:12.428399Z 0[ERROR]Plugin’InnoDB’init函数返回错误。
2020-06-29T14:01:12.429793Z 0[ERROR]插件“InnoDB”注册为存储引擎失败。
2020-06-29T14:01:12.431115Z 0[ERROR]未能初始化内置插件。
2020-06-29T14:01:12.432396Z 0[错误]中止
2020-06-29T14:01:12.433177Z 0[注]Binlog结束
2020-06-29T14:01:12.434133Z 0[注]关闭插件“CSV”
2020-06-29T14:01:12.435961Z 0[注]MySQL:关闭完成
3.错误点:
原因是InnoDB初始化异常,也就是是说,卸载mysql的时候,忘记卸载了InnoDB服务器,也就造成了,我再次重新安装服务后,再次启动mysql服务器的时候,会出现异常。
4.修改过程:
先删掉了原来的data文件夹,在my.ini中加入了
innodb_force_recovery = 1
innodb_flush_method=normal
(我直接加在了最后面)
然后在cmd中的mysql路径的bin下使用了
mysqld --initialize-insecure --user=mysql
再net start mysql
终于在经过8个小时我,tm搞定了,累死我了
解决方法:删掉E:\MySql\mysql-5.7.22-winx64\data中ib_logfile和ibdata的文件,然后重启mysql服务器,即可。
感谢大神的帮助
https://www.cnblogs.com/zzu-zmh/archive/2018/06/13/9176231.html