当前位置:首页 > 操作系统 > MacOs

mac sequel连接mysql


brew的安装可以参考 https://daguang.blog.csdn.net/article/details/114530256

brew 安装 mysql

brew install mysql

可视化工具:

https://m4.pc6.com/cjh3/sequelpro.dmg

1、用sequel pro 工具登录,连接失败~!“authentication plugin 'caching_sha2_password' cannot be loaded”

失败原因:

mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password

解决办法:

把mysql用户登录密码加密规则还原成mysql_native_password

具体步骤如下

1、登录

mysql -u root -p

alter user 'root'@'localhost' identified by '新密码'; 

如果提示密码策略问题,可以用复杂点的密码 如 root@123456  

2、修改账户密码加密规则并更新用户密码

alter user 'root'@'localhost' identified by 'root@123456' password expire never;   #修改加密规则

alter user 'root'@'localhost' identified with mysql_native_password by 'root@123456';   #更新一下用户的密码

 3、刷新权限

flush privileges;

4、如果还是连接不上,可以重启下mysql

mysql.server restart 


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!