1.建立用戶
insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values("localhost","hello",password("Test"),"","","");
刷新權限
flush privileges;
建立數據庫
create database test;
給數據庫賦予權限
grant all privileges on test.* to hello
@localhost identified by 'Test'; flush privileges; 2.刪除用戶 delete from user whrer User="hello" and Host="localhost"; 刪除數據庫 drop database test; 3.修改指定用戶的密碼 mysql -u root -p 密碼 update mysql.user set password('新密碼') where User="hello" and Host="localhost"; flush privileges;