(M1 MAC) mysql error 2002

lgw2236·2023년 1월 29일
0

m1 맥북에 db 세팅을 새로 하다가 mysql 설치 후 최초 root 계정 로그인 상황에서

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

라는 error 를 보게 됐는데 윈도우 환경에서는 본적 없었던 생소한 에러였어서 해결 방법을 기록해놓고자 한다..

#1. brew 상태확인
brew 서비스를 확인해보니 status 가 none 으로 되어있었다.

$ brew services list
Name     Status User File
mysql    none

#2. brew mysql 서비스 시작

brew services start mysql

#3. 이후 로그인 과정을 다시 시도해보니

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 8.0.32 Homebrew

Copyright (c) 2000, 2023, 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.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

성공적으로 로그인 되는 모습을 볼 수 있었다.

profile
어제보다 오늘 더

0개의 댓글