設置用戶權限:mysql
grant all on *.* to web@localhost with grant option;web
建立用戶sql
create user web@localhost ;數據庫
查詢用戶(就是數據庫mysql中的表user記錄了用戶和用戶權限)spa
use mysql;.net
select * from user; get
設置用戶密碼it
update user set password=password('web123') where user='web'; io
更新數據庫class
flush privileges;
刪除用戶
drop user web@localhost ;