改ROOT口令
stop mysql //停MYSQ服務
CD 到mysql bin目錄下mysqldnt skipgranttables //啟動MYSQL
DOS下mysql mysql //登錄到mysql庫
update user set password =PASSWORD(fuck) where user=root
FLUSH PRIVILEGES;
建庫
create database xx;
FLUSH PRIVILEGES;
建用戶
insert into mysqluser(HostUserPasswordssl_cipherx_issuerx_subject) values(localhostusernamePASSWORD(password));
grant all privileges on xx* to username@localhost identified by password
FLUSH PRIVILEGES;
From:http://tw.wingwit.com/Article/os/xtgl/201311/8933.html