Mysql报错[ERROR] InnoDB: Operating system error number 87 in a fil

彻底放弃了Windows11 昨晚格盘重装Windows10,秉承着本地环境可以不用,但是不能没有的原则还是装了一下用过很久很久的PHPenv

wtm,mysql跑不起,排查log

2023-01-04T11:02:14.418303+08:00 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2023-01-04T11:02:14.418400+08:00 0 [Note] D:\phpEnv\server\mysql\mysql-5.7\bin\mysqld.exe (mysqld 5.7.28) starting as process 8560 ...
2023-01-04T11:02:14.423956+08:00 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-01-04T11:02:14.424269+08:00 0 [Note] InnoDB: Uses event mutexes
2023-01-04T11:02:14.424472+08:00 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2023-01-04T11:02:14.424781+08:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-01-04T11:02:14.425320+08:00 0 [Note] InnoDB: Number of pools: 1
2023-01-04T11:02:14.425663+08:00 0 [Note] InnoDB: Not using CPU crc32 instructions
2023-01-04T11:02:14.428430+08:00 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2023-01-04T11:02:14.437779+08:00 0 [Note] InnoDB: Completed initialization of buffer pool
2023-01-04T11:02:14.508553+08:00 0 [Note] InnoDB: Highest supported file format is Barracuda.
2023-01-04T11:02:14.508940+08:00 0 [ERROR] InnoDB: Operating system error number 87 in a file operation.
2023-01-04T11:02:14.509240+08:00 0 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2023-01-04T11:02:14.509953+08:00 0 [ERROR] InnoDB: File .\ib_logfile0: 'aio read' returned OS error 187. Cannot continue operation
2023-01-04T11:02:14.510359+08:00 0 [ERROR] InnoDB: Cannot continue operation.

我是记得每次本地跑Mysql都要改下配置文件,忽忽悠悠,又加上熬夜,忘得干干净净 由于系统的硬盘分区的原因,mysql无法启动!

解决方法

在对应mysql版本的my.ini的文件里,[mysqld]分组里添加一行

innodb_flush_method=normal

THE END