mysql 权限的相应修改

UPDATE user SET Password = PASSWORD('bbbb') WHERE user = 'root';
flush privileges;

update user set host = '%' where user ='root';
flush privileges;


GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'bbbb' WITH GRANT OPTION;

只赋予某用户名某库的读权限

GRANT select ON dbname.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

 

posted on 2016-07-26 10:30  阳光小白  阅读(221)  评论(0编辑  收藏  举报