授权所有的数据库和表给所有的用户
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'passwd' WITH GRANT OPTION;
授权所有的db数据库的table表给所有的用户
GRANT ALL PRIVILEGES ON db.table TO 'root'@'%' IDENTIFIED BY 'passwd' WITH GRANT OPTION;
刷新数据库
flush privileges;
查询表权限
select User, host from mysql.user;