mac mysql报错Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2) //Couldn‘t find

本文介绍了如何处理在Mac上遇到的MySQL连接错误'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'。通过卸载并重新安装MySQL 5.6,调整my.cnf配置文件,并参照特定教程,最终成功解决了问题。
摘要由CSDN通过智能技术生成

brew卸载之前mysql

brew uninstall mysql@版本号
rm -rf /usr/local/var/mysql
rm /usr/local/etc/my.cnf

brew重新安装mysql5.6

brew install mysql@5.6
brew services start mysql@5.6

问题

mysql_secure_installation

报错 Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

sudo mysql.server start

报错 ERROR! Couldn’t find MySQL server (/usr/local/Cellar/mysql@5.6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值