MySQL新建用户无法登录

Access denied for user xiaoqiu@localhost (using password :NO) 

resolution:

  • 删除匿名用户(mysql.user表中user为空的用户)
delete from user where mysql.user='';
  • 生效(更改了用户表,用户的权限都需要执行,否则需要重启MySQL服务)
flush privileges;
欢迎关注我的公众号:小秋的博客 CSDN博客:https://blog.csdn.net/xiaoqiu_cr github:https://github.com/crr121 联系邮箱:rongchen633@gmail.com 有什么问题可以给我留言噢~
原文地址:https://www.cnblogs.com/flyingcr/p/10326870.html