当前位置:   article > 正文

【MySQL安装问题】mysqld --initialize初始化报错_mysql初始化数据库报错

mysql初始化数据库报错

在显示安装成功MySQL后,初始化mysqld --initialize报错,错误显示如下

2023-04-03T709:05:28.842980Z O[Warning] TMESTAMP with implicit DEFAULT walue is deprecated.Please use -explicit_lefatlts_for_timestamp server option (see documentation for more details).
2023-04-03T09:05:28.8430327O [Warning] 'NO_ZERO_DATE', ‘NO_ZBRO _TN DATE' and 'ERROR FOR DIVISIO0N BY_EAo’sgql modes sthould be used with strict mode. They will be merged with strict mode in a future release.
2023-04-03TO9:05:28.843036Z 0[Warning] 'NO_AUTO_CREATE_USER’sql mode was not set.
2023-04-03T09:05:28.8484282 0 [BRROR] ~--initialize specified but the data directory has files in it.Aborting.2023-04-03T09: 05:28.848925Z 0[ERROR] Aborting

报错大致意思是所在数据文件夹不为空

解决方法:打开MySQL安装目录,在mysql-5.7.41-winx64目录下有一个data文件夹,把整个data删除,再重新mysqld --initialize初始化,会得到一个新的data,接着输入net start mysql启动成功

该报错的可能原因:之前安装过MySQL,没删干净,导致初始化数据库时data还有之前的数据 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/877035
推荐阅读
相关标签
  

闽ICP备14008679号