查看
mysql> show grants for blog@'%'; GRANT USAGE ON *.* TO 'blog'@'%' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `myblog`.* TO 'blog'@'%'
收回
mysql> revoke all privileges on *.* from root@'%'; Query OK, 0 rows affected (0.18 sec)
在将权限授给指定主机的用户时,主机名必须存在于 /etc/hosts文件