创建用户后登陆失败的原因是存在匿名用户:
root@controller:~# mysql -h localhost -uaa -ppassword
ERROR 1045 (28000): Access denied for user 'aa'@'localhost' (using password: YES)
解决方法:
增加普通用户后,登陆root账号,执行:
mysql> use mysql
mysql> delete from user where user='';
mysql> flush privileges;
意思是删除匿名用户。
OK,搞定,enjoy!

相关文章:

  • 2022-12-23
  • 2021-11-14
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-10-14
  • 2021-11-23
猜你喜欢
  • 2021-10-25
  • 2021-11-24
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
相关资源
相似解决方案