ERROR 2002 (HY000): Can't connect to local MySQL

이지훈·2022년 4월 18일
0

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

에러가 떴다.
rds만 사용하다가 올만에 local에서 mysql 연결하려니까 mysql을 다시 켜줘야했나보다.


그래서 다시 켜줬다.

mysql.server start

ERROR! The server quit without updating PID file (/usr/local/var/mysql/ijihuns-MacBook-Air.local.pid).

음.. 뭔가 꼬였나보다.

mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

해결방법

brew install mysql
mysql.server start

걍 다시 깔고 재부팅하셈

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.28 Homebrew

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

profile
꾸준하게 🐌

0개의 댓글