
갑자기 잘되던 Mysql이 재부팅 후 먹통이 되는 난감한 상황이 발생하였다.
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
위와 같은 오류가 발생하며 mysql을 restart를 해도 실행되지 않는 오류가 발생하였다.
[시도 방법]
해당 touch로 sock파일을 임시로 만들고 접근권한을 부여하는 등 여러가지 방법들을 해보았으나 적용되지 않았고
[해결 방법]
1. 가이드 대로 서버 복구 강제 실행하기
- https://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html
MySQL :: MySQL 5.7 Reference Manual :: 14.22.2 Forcing InnoDB Recovery
14.22.2 Forcing InnoDB Recovery To investigate database page corruption, you might dump your tables from the database with SELECT ... INTO OUTFILE. Usually, most of the data obtained in this way is intact. Serious corruption might cause SELECT * FROM tbl_
dev.mysql.com
2. 데이터베이스 데이터 폴더 접근권한 부여
- chmod -R 755 /var/lib/mysql
3. mysql 재시작
- service mysql restart
[결과]

다시 Mysql이 정상적으로 실행되었다.
'서버개발자 역량' 카테고리의 다른 글
서버 용량 부족 확보 (0) | 2020.06.01 |
---|---|
Nginx] nginx.service failed to parse pid from file /run/nginx.pid 오류 해결 (1) | 2020.04.23 |
AWS ] SSH 루트 계정 비밀번호 로그인 허용하기 (0) | 2020.04.23 |
Apache ] Directory Indexing 이슈 해결 (0) | 2020.03.19 |
NginX ] nginx서버 php 다운로드 오류 (0) | 2020.02.17 |