mysql报错--initialize specified but the data directory has files in it. Aborting.

初始化msyql时出现报错

C:\mysql-5.7.19-winx64> C:\mysql-5.7.19-winx64\bin\mysqld --initialize-insecure
2019-12-25T01:59:21.234788Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-12-25T01:59:21.237781Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2019-12-25T01:59:21.239775Z 0 [ERROR] Aborting

 

原因是data文件夹已经创建

解决办法:删除该目录下的data文件夹,删除后重新执行该命令该文件夹会重新生成,成功初始化

 

posted @ 2019-12-25 11:42  Operater  阅读(3848)  评论(0编辑  收藏  举报