解壓版mysql 錯誤-mysql啟動失敗


參考博客:https://blog.csdn.net/kerecs/article/details/51498754

    https://blog.csdn.net/zwj1030711290/article/details/80039780

1.在mysql安裝目錄下刪除data目錄

 

2.my.ini目錄下的路徑由\改為\\

basedir = D:\\studySoft\\mysql-8.0.11
datadir = D:\\studySoft\\mysql-8.0.11\\data

3.管理員身份模式進入mysql下的bin目錄

 

4.移除已注冊服務:

mysqld remove

 

5.初始化:mysqld --initialize --console

2018-04-20T02:35:01.507037Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-04-20T02:35:01.507640Z 0 [System] [MY-013169] [Server] D:\Program\MySQL8\bin\mysqld.exe (mysqld 8.0.11) initializing of server in progress as process 11064
2018-04-20T02:35:01.508173Z 0 [ERROR] [MY-010340] [Server] Error message file 'D:\Program\MySQL\share\english\errmsg.sys' had only 1090 error messages, but it should contain at least 4512 error messages. Check that the above file is the right version for this program!
2018-04-20T02:35:05.464644Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: APWCY5ws&hjQ
2018-04-20T02:35:07.017280Z 0 [System] [MY-013170] [Server] D:\Program\MySQL8\bin\mysqld.exe (mysqld 8.0.11) initializing of server has completed

標紅為生成的root密碼,記錄下來。

 

6.注冊服務:

mysqld -install

 

7.更改密碼:

  輸入 mysql -uroot -p命令后,輸入之前記錄的root密碼

 

8.更改密碼命令

MySQL8.0.4以前,執行

SET PASSWORD=PASSWORD('[修改的密碼]');
mysql8.0.4以后
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '修改的密碼';

 

9.啟動服務:net start mysql


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM