解决Mysql ERROR 1045 (28000)“Access denied for user 'root'@'localhost'”

1. 查看某个用户的权限

    mysql> show grants for 'episode'@'%';

2.为用户添加某个数据库的权限:

 mysql> GRANT ALL PRIVILEGES ON `episode_cc`.* TO 'episode'@'%' WITH GRANT OPTION;

如果是给所有数据库的权限,则是:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'episode'@'%' WITH GRANT OPTION;


你可能感兴趣的:(mysql,权限,grant)