1. 程式人生 > >mysql 安裝出現 Install/Remove of the Service Denied!錯誤

mysql 安裝出現 Install/Remove of the Service Denied!錯誤

進入 C:\Windows\system32 找到CMD.EXE 右鍵選擇 以管理員身份執行

然後執行 mysqld -install ;net start mysql;

D:\wamp\mysql\bin>mysql -uroot

mysql>show databases; 

mysql>use mysql;

mysql>delete from User where User="";

mysql>update User set Password=PASSWORD('newpassword') where User='root';

mysql>FLUSH PRIVILEGES; 

mysql>quit;

FLUSH PRIVILEGES:強制讓MySQL重新載入許可權,即刻生效

此時登入時可用如下命令:

D:\wamp\mysql\bin>mysql -uroot -p

ENTERPASSWORD:newpassword