mysql用戶權限基本操作

創建用戶

create user 'username'@'host' IDENTIFIED BY 'PASSWORD'

 

給指定用戶授權

 

grant all on DBName.* to 'username'@'host'

 

刷新權限

 

flush privileges;

 

查看用戶權限

 

show grants for 'user'@'host'

 

換行查詢信息,主要針對多行

 

select * from user \G

 

You May Also Like