개발자의 끄적끄적

[sql/mysql] mysql/mariadb Can't connect to local MySQL server through socket '/tmp/mysql.sock 에러 해결 방법 본문

개발/sql

[sql/mysql] mysql/mariadb Can't connect to local MySQL server through socket '/tmp/mysql.sock 에러 해결 방법

효벨 2022. 5. 28. 01:00
728x90
반응형

[sql/mysql] mysql/mariadb Can't connect to local MySQL server through socket '/tmp/mysql.sock 에러 해결 방법

 

 

mysql / mariadb 를 연동해서

 

작업을 하다보면

 

아래와 같은 소켓 에러가

 

발생하는 경우가 있습니다!

 

Can't connect to local MySQL server through socket '/tmp/mysql.sock

 

그럴때는

 

여러가지 방법이 있겠지만,

 

대부분 심폴릭 링크 오류라서

 

아래와 같이

 

심볼릭 링크를 생성해주면 됩니다!

 

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

 

참고들 하세요!

반응형
Comments