sequel pro连接mysql失败

最近在macbookpro上使用homebrew安装MySQL,然后使用sequel pro连接本地数据库。出现了如下错误

Unable to connect to host 127.0.0.1, or the request timed out.  Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).  MySQL said: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found

然后再网上找到这个解释:“这个错误的原因是sequel pro,没有准备好进行新的用户登录,错误表明没有驱动,找到系统偏好设置,mysql安装驱动。”

可我在系统偏好设置里并没有找到mysql,于是按照网友的余下步骤去执行,

1、打开mysql的配置文件 my.cnf并添加

default-authentication-plugin=mysql_native_password

2、从终端进入mysql 服务器:mysql -uroot -p(顺便提一下,我的mysql默认是空密码)

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '[password]';

执行这个更改用户的密码。

3、退出并重启mysql :brew services restart mysql

然后就大功告成顺利解决问题

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值