在 Windows10 中安装新版 PHPStudy,发现 MySQL 数据库无法启动,错误信息如下:
210203 7:46:55 [Note] Plugin 'FEDERATED' is disabled.
210203 7:46:55 InnoDB: The InnoDB memory heap is disabled
210203 7:46:55 InnoDB: Mutexes and rw_locks use Windows interlocked functions
210203 7:46:55 InnoDB: Compressed tables use zlib 1.2.3
210203 7:46:55 InnoDB: Initializing buffer pool, size = 64.0M
210203 7:46:55 InnoDB: Completed initialization of buffer pool
210203 7:46:58 InnoDB: highest supported file format is Barracuda.
210203 7:46:58 InnoDB: Operating system error number 87 in a file operation.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File name .\ib_logfile0
InnoDB: File operation call: 'aio read'.
InnoDB: Cannot continue operation.
MySQL 默认 innodb_flush_method=async_unbuffered
,该选项不支持在 Windows 的 4K 扇区硬盘上运行 MySQL 服务器,解决方法是在 [mysqld]
选项下新增 innodb_flush_method=normal
即可。