語法:數據庫
create user 用戶名@"ip地址" "identified" by 密碼;ide
舉例:ip
create user tom@"192.168.101" identified by "123";select
建立除本機之外其餘ip第能登入權限
create user 用戶名@"%" "identified" by 密碼;語法
grant all on *.* to toms@"%" identified by "123";密碼
REVOKE all privileges [column] on 庫名.表名 from user@"host";總結
column 不填表示全部字段數據
drop user@"host"vi
flush privileges; 刷新權限表 一些時候權限信息可能會有所延遲 能夠執行該語句當即刷新權限信息