D:\mysql\mysql\bin>mysqld --initialize --console
2024-03-20T11:49:12.989834Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-03-20T11:49:13.003549Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2024-03-20T11:49:13.003784Z 0 [System] [MY-013169] [Server] D:\mysql\mysql\bin\mysqld.exe (mysqld 8.3.0) initializing of server in progress as process 81760
2024-03-20T11:49:13.021081Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2024-03-20T11:49:13.021093Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\mysql\mysql\data\ is unusable. You can remove all files that the server added to it.
2024-03-20T11:49:13.021413Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-03-20T11:49:13.024162Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
问题描述 :
原因:
初始化过一次,因为改了文件名想重新初始化,原因为第一次初始化与第二次初始化所产生的data文件夹数据冲突
解决办法:
删掉原来的data文件夹
重新初始化