语法:数据库
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; 刷新权限表 一些时候权限信息可能会有所延迟 能够执行该语句当即刷新权限信息