mysql使用root用户给普通用户授权之后,还是登陆不上去,如图

QQ截图20160515111033.png QQ截图20160515111045.png

wangxiaolei

赞同来自: Poodah

1、设置密码 mysql -u root –p set password for 'wjf'@'localhost' = password('密码'); 2、在mysql数据库中,修改mytest用户连接的host为所有。 mysql>use mysql; mysql>update user set host = '%' where user = 'wjf'; 3、赋权限 mysql>GRANT ALL PRIVILEGES ON *.* TO 'wjf'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION; mysql>FLUSH PRIVILEGES;

wangxiaolei

赞同来自:

你设置的wjf的密码是password? grant all PRIVILEGES on *.* to wjf@'%' identified by 'wjf用户的密码'; flush PRIVILEGES;  

要回复问题请先登录注册