我用 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)
请问为啥?
黄舟2017-04-17 13:40:43
grant的命令格式为:mysql> grant all on . to 'user'@'ip' identified by 'password' with grant option;
怪我咯2017-04-17 13:40:43
grant all on . to 'ja'@'%' identified by '123' with grant option;
flush privileges;
quit;
然后再登录看看:mysql -u ja -p 123