mysqld --initialize --console
2024-05-31T09:03:06.114353Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-05-31T09:03:06.123281Z 0 [System] [MY-013169] [Server] D:\mysql\mysql-8.4.0-winx64\bin\mysqld.exe (mysqld 8.4.0) initializing of server in progress as process 18460
2024-05-31T09:03:06.125526Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2024-05-31T09:03:06.125539Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\mysql\mysql-8.4.0-winx64\data\ is unusable. You can remove all files that the server added to it.
2024-05-31T09:03:06.125715Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-31T09:03:06.126160Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
11-04
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)