MAC下的mysql 登陆的时候提示Access denied for user 'root@'localhost' (using password: YES)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MAC下的mysql 登陆的时候提示Access denied for user 'root@'localhost' (using password: YES)相关的知识,希望对你有一定的参考价值。

在初始的数据库中,存在一个用户名为空的账户和一个root账户,即''@'localhost'和'root'@'localhost',只需要以root登录后,将空的账户删除即可,delete from user where User=''; 然后执行flush privileges; ,exit退出mysql, 再以你需要登录的账户和密码登录即可,成功。 参考技术A 1、检查账号,密码是否正确
2、检查账号权限
3、检查服务器是否开启远程访问权限
4、检查本地网络是否能访问mysql服务器
5、使用其它机器试下
参考技术B root的密码不对

Centos2下mysql提示Access denied for user 'root'@'localhost' (using password: YES)

远程登陆可以,在本地登录不上,回答符合第一时间给采纳!

参考技术A 你在改root密码的时候再加上一句给权限的语句:
grant
all
on
mysql.*
to
'root'@'localhost'
identified
by
'password';
最后那个password即是你要修改的root用户的密码

以上是关于MAC下的mysql 登陆的时候提示Access denied for user 'root@'localhost' (using password: YES)的主要内容,如果未能解决你的问题,请参考以下文章

mac安装mysql报错ERROR 1045 (28000): Access denied for.

后台无法登陆,出现Access denied 是啥意思?

mac下的mysql问题:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pa

mac 环境下 登陆失败问题Access denied for user 'root'@'localhost' (using password: YES)

用heidisql连接远程mysql数据库提示SQL错误1045,Access denied for...

后台登陆失败,出现Access denied怎么办?