首頁 >資料庫 >mysql教程 >WINDOWS主机mysql更改ROOT口令&建库&用户_MySQL

WINDOWS主机mysql更改ROOT口令&建库&用户_MySQL

WBOY
WBOY原創
2016-06-01 13:47:261123瀏覽

bitsCN.com

改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;

bitsCN.com
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn