WINDOWS主機mysql更改ROOT口令&建庫&用戶

改ROOT口令
1.net stop mysql //停MYSQ服務
2.CD 到mysql bin目錄下mysqld-nt –skip-grant-tables //啟動MYSQL
3.DOS下mysql mysql //登錄到mysql庫
4.update user set password =PASSWORD(“fuck”) where user=root
5.FLUSH PRIVILEGES;


建庫
1.create database xx;
2.FLUSH PRIVILEGES;


建用戶
1.insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values(“localhost”,”username”,PASSWORD(“password”),,,);
2.grant all privileges on xx.* to username@localhost identified by password
3.FLUSH PRIVILEGES;

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *