84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我用 mysql -u root -p登陆进去敲入命令grant all on.to ja identified by '123' with grant option;提示Query OK, 0 rows affected (0.00 sec)
退出后,用刚新建的ja账号登陆mysql -u ja -p
提示 ERROR 1045 (28000): Access denied for user 'ja'@'localhost' (using password: YES)
请问为啥?
认证高级PHP讲师
You need to refresh the system permission table [flush privilege] before this user can log in effectively
flush privileges;
If you grant all on.to ja@localhost ..., there should be no error
The command format of
grant is: mysql> grant all on.to 'user'@'ip' identified by 'password' with grant option;
grant all on.to 'ja'@'%' identified by '123' with grant option;flush privileges;quit;then log in again Take a look: mysql -u ja -p 123
You need to refresh the system permission table [flush privilege] before this user can log in effectively
If you grant all on.to ja@localhost ...
, there should be no error
The command format of
grant is: mysql> grant all on.to 'user'@'ip' identified by 'password' with grant option;