MySQL root用户能正常登录,新建的普通用户无法登录,报如下异常
MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)
这里附StackOverflow原问题链接:
笔者的解决方法是:新建完用户一定要刷新权限
create user 'test'@'%' identified by '123456';
flush privileges;
或者用赋权语句创建用户
grant all on test.* to 'test'@'localhost' identified by '123456';
flush privileges;