Beginning configuration step: Initializing Database
Deleting the data directory from a previous (failed) configuration...
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.13...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
2018-11-01T16:28:35.442346Z 0 [Warning] [MY-010915] [Server] '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.
2018-11-01T16:28:35.442449Z 0 [System] [MY-013169] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.13) initializing of server in progress as process 12668
mysqld: File '.\绁炴鑸?bin.index' not found (OS errno 2 - No such file or directory)
2018-11-01T16:28:35.449875Z 0 [ERROR] [MY-013236] [Server] Newly created data directory C:\ProgramData\MySQL\MySQL Server 8.0\Data\ is unusable. You can safely remove it.
2018-11-01T16:28:35.450071Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-11-01T16:28:35.450295Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.13) MySQL Community Server - GPL.
Process for mysqld, with ID 12668, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.13.
Database initialization failed.
Ended configuration step: Initializing Database
找到原因了,C:\ProgramData\MySQL\MySQL Server 8.0\my.ini 关闭配置程序,把这里的乱码该掉,再重新配置就可以了
log-output=FILE
general-log=0
general_log_file="绁炴鑸?log"
slow-query-log=1
slow_query_log_file="绁炴鑸?slow.log"
long_query_time=10
log-bin="绁炴鑸?bin"
log-error="绁炴鑸?err"
----------------------改成如下内容---------------------------
log-output=FILE
general-log=0
general_log_file="zhaowd.log"
slow-query-log=1
slow_query_log_file="zhaowd-slow.log"
long_query_time=10
log-bin="zhaowd-bin"
log-error="zhaowd.err"
mysqld: File '.\绁炴鑸?bin.index' not found (OS errno 2 - No such file or directory)
为什么有乱码呢,你的文件名是中文,还是你的硬盘没有正确关机导致文件系统受损了?用管理员权限运行chkdsk c: /f检查下。
文件路径的中文去掉后试试,可能是乱码造成文件找不到。
非常感谢!