在显示安装成功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还有之前的数据 文章来源:https://www.toymoban.com/news/detail-514232.html
文章来源地址https://www.toymoban.com/news/detail-514232.html
到了这里,关于【MySQL安装问题】mysqld --initialize初始化报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!