mysqld: [ERROR] Found option without preceding group in config file X:\software\ mysql-8.0.13-winx64\my.ini at line 1. mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
在 MySQL 的安裝目錄的倉目錄(X:\\software\mysql-8.0.13-winx64\bin)下執行命令:
1
mysqld --initialize --console
?
安裝成功:
1 2 3 4
2018-12-20T06:53:02.660175Z 0 [System] [MY-013169] [Server] X:\software\mysql-8.0.13-winx64\bin\mysqld.exe (mysqld 8.0.13) initializing of server in progress as process 7384 2018-12-20T06:53:02.677176Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2018-12-20T06:53:14.639860Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: A#7L*VV!u-lt 2018-12-20T06:53:20.538197Z 0 [System] [MY-013170] [Server] X:\software\mysql-8.0.13-winx64\bin\mysqld.exe (mysqld 8.0.13) initializing of server has completed
?
安裝服務
在 MySQL 的安裝目錄的倉目錄(X:\\software\mysql-8.0.13-winx64\bin)下執行命令:
1
mysqld --install [服務名](服務名可以不加默認為mysql)
?
服務安裝成功之后通過命令?net start mysql?啟動 MySQL 的服務。
進入 MySQL,更改密碼
執行命令:
1
mysql -u root -p
?
下面修改密碼:
1
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密碼';