在mac下使用brew安装mysql,之前没有使用过,今天启动的时候发现启动不了
错误提示:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
查看mysql的安装位置:
ytcs-MacBook-Air:~ ytc$ which mysql
/usr/local/bin/mysql
有可能是mysql服务没有启动
ytcs-MacBook-Air:~ ytc$ mysql.server start
Starting MySQL
SUCCESS!
进入mysql,成功解决。
mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.18 Homebrew

本文记录了在Mac上使用brew安装MySQL后遇到的启动问题及解决过程。作者遇到错误提示无法通过socket连接到本地MySQL服务器,通过检查发现mysql服务未启动,最终通过手动启动服务解决了问题。
2060

被折叠的 条评论
为什么被折叠?



