grant 权限1,权限2,…权限n on 数据库名称.表名称 to 用户名@用户地址 identified by ‘链接口令’;mysql
grant all on ems.ems to uni@'%' identified by '777'; //百分号表示任何地址sql
赋予用户全部权限,可是却没法查看表,是由于匿名登陆的缘由,用mysql -u root -p 登陆mysql,而后用select host,user from mysql.user;命令查看表中的匿名用户,user列下的空用户名即为匿名用户,用命令delete from mysql.user where user='';删除匿名用户,重启mysql服务,匿名用户即没法登陆!数据库