創建用戶
create user 用戶名@ip地址 identified by '密碼'
>用戶只能在指定的ip地址上登錄
create user 用戶名@'%' identified by '密碼';
>用戶可以在任意的ip地址登錄
授權:
grant 權限1,...權限n[all] on 數據庫.* to 用戶名@ip地址
撤銷權限
revoke 權限1,..權限n on 數據庫.表名 from 用戶名@ip地址
show grant for 用戶名@ip地址
刪除用戶;
drop user 用戶名@ip地址