[ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting

直接上图

C:\WINDOWS\system32> mysqld --initialize --console
2019-10-03T12:15:18.041609Z 0 [System] [MY-013169] [Server] D:\Tools\mysql\mysql-8.0.17-winx64\bin\mysqld.exe (mysqld 8.0.17) initializing of server in progress as process 6036
2019-10-03T12:15:18.042820Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2019-10-03T12:15:18.043622Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2019-10-03T12:15:18.043635Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\Tools\mysql\mysql-8.0.17-winx64\data\ is unusable. You can remove all files that the server added to it.
2019-10-03T12:15:18.060173Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-10-03T12:15:18.060303Z 0 [System] [MY-010910] [Server] D:\Tools\mysql\mysql-8.0.17-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.17)  MySQL Community Server - GPL 

直接删除一下data文件下的所有东西就行了

这是重装时产生的问题 。

注意自己的my.ini中配置的datadir指定的是那个data文件夹。把这个文件夹的东西都删除就OK了

猜你喜欢

转载自blog.csdn.net/qq_40099908/article/details/102015231