一、 G:\MySQL\MySQL Server 5.7\bin>mysqld --initialize G:\MySQL\MySQL Server 5.7\bin>mysqld -installService successfully installed. G:\MySQL\MySQL Serve ...
一、
G:\MySQL\MySQL Server 5.7\bin>mysqld --initialize
G:\MySQL\MySQL Server 5.7\bin>mysqld -install
Service successfully installed.
G:\MySQL\MySQL Server 5.7\bin>
二、輸入密碼時候輸入.err文件下那密碼
附件:
之前直接用mysqld -install ,結果啟動服務時候報錯本地電腦上的MySQL服務啟動後停止。某些服務在未由其他服務或程式使用時將自動停止
然後mysqld --remove mysql 移動該服務,接著上述的兩步,就OK了
如果出現:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
就 SET PASSWORD = PASSWORD('新密碼');