在顯示安裝成功MySQL后,初始化mysqld --initialize報(bào)錯(cuò),錯(cuò)誤顯示如下
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
報(bào)錯(cuò)大致意思是所在數(shù)據(jù)文件夾不為空
解決方法:打開MySQL安裝目錄,在mysql-5.7.41-winx64目錄下有一個(gè)data文件夾,把整個(gè)data刪除,再重新mysqld --initialize初始化,會得到一個(gè)新的data,接著輸入net start mysql啟動(dòng)成功
該報(bào)錯(cuò)的可能原因:之前安裝過MySQL,沒刪干凈,導(dǎo)致初始化數(shù)據(jù)庫時(shí)data還有之前的數(shù)據(jù)?文章來源:http://www.zghlxwxcb.cn/news/detail-514232.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-514232.html
到了這里,關(guān)于【MySQL安裝問題】mysqld --initialize初始化報(bào)錯(cuò)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!