사이트가 MySQL Connect Error!!! 오류 납니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
사이트가 MySQL Connect Error!!! 오류 납니다.

QA

사이트가 MySQL Connect Error!!! 오류 납니다.

답변 2

본문

사이트가 MySQL Connect Error!!! 오류 납니다. 

금요일 밤에 관리자 페이지에서 sns 보내기에  

페이스북이나 다른건 사용하지 않고 트위터에만 키값을 넣고 확인을 클릭했습니다. 

처음엔 사이트에 아무 이상이 없었는데 어제 토요일날 사이트에 접속해보니 

디비오류가 나있고 아래처럼 저게 112개나 되있데요.  

 

[root@localhost ~]# pgrep -x httpd | wc -l 

112


다른때는 프로세스를 모두 제거해주고 아파치를 재실행 해주면 사이트가 열렸는데 

지금은 사라지질 않아요.

mysql만 재실행되면 될거 같아보이는데 검색해보고 이것저것 해봤는데 잘 안되네요.  

 

/adm/phpMyAdmin 페이지는 접속이 되는데 비번입력하고 실행하면 넘어가질않고 별 반응이 없어요. 

 

[root@localhost ~]# service mysqld stop

Timeout error occurred trying to stop MySQL Daemon.

MySQL 를 정지 중:                                          [실패]

 


[root@localhost ~]# service mysqld start
Timeout error occurred trying to start MySQL Daemon.
MySQL (을)를 시작 중:                                      [실패]


[root@localhost ~]# mysql -uroot -p비번
Warning: option 'select_limit': unsigned value 18446744073709551615 adjusted to 4294967295
Warning: option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


[root@localhost ~]# cd /bin

[root@localhost bin]# mysql

Warning: option 'select_limit': unsigned value 18446744073709551615 adjusted to 4294967295

Warning: option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295

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


 

[root@localhost ~]# ps -eaf |grep mysql

root       496     1  0  2015 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --user=mysql

mysql      539   496 10  2015 ?        12-13:46:12 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/lib/mysql/mysql.sock

root      9248  5955  0 23:57 pts/0    00:00:00 grep mysql

 

 

원인 

-MySQL 데몬이 작동하지 않은 상태에서 mysql를 실행하고자 할 때 발생하는 메시지 

 

-MySQL데몬이 작동하지 않는 것은 safe_mysql --user=mysql & 명령을 실행해 주지 않거나, 

 

-MySQL RPM 패키지가 존재하는 상태에서 소스 컴파일하여 설치하였을 경우 데몬이 충돌이 일어날 경우 

 


해결법

1.  cd /usr/local/mysql/bin

2.  ./mysqld_safe --user=root &

3.  ./mysqld_safe & 

 

 

검색으로 찾아서 위 내용처럼 해보니 

겨우 MySQL은 연결이 되서 /adm/phpMyAdmin 페이지에는 정상접속이 됬는데 디비와 연동되는? 메인이나 다른페이지는 MySQL Connect Error!!! 한줄만 뜨고 계속 열리지를 않네요 

 

여기서 뭘 확인해보고 추가로 손을 봐야  오류를 해결할수 있나요? 

이 질문에 댓글 쓰기 :

답변 2

그누보드 4에서는 이상하게 저런현상이 종종 발생하더군요... 저도 예전에 작업할때 저 사항으로 한참을 고민하다가 2주만에 방법을 찾긴 했습니다만... 일단 재설치하는게 가장 좋구요...

 

저는 데이터도 날리기 싫어서 수를 좀 썼습니다... 

(물론 완전 똑같은 경우는 아니였습니다.)

 

그리고 추가적으로 보자면, 뭔가 더 긴 길이의 문자열이 삽입되서 필드에 순응하지 않아서 생기는 에러임을 알 수 있습니다..

(왠지 트위터 키값이... 저쪽에 넣어진 모양이네요..)

http://www.linuxquestions.org/questions/debian-26/mysql-server-5-0-question-squeeze-753805/

Interesting as the sizes listed in the original problem are an indication that you had a 64 bit and have now installed the 32 bit packages. The limits that are reduced

Quote:
Warning: option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
Warning: option 'select_limit': unsigned value 18446744073709551615 adjusted to 4294967295
The limit 18446744073709551615 is only available in 64 Bit MySQL, the default for 32 bit is the value to which it has reduced ie. 4294967295.

The other problem you have listed above may also be an issue however it seems you may have switched from 64 to 32 bit packages for the MySQL server.
 
답변들에 따르면, 현재 32비트 패키지가 설치되어 있고, 64비트 패키지를 설치해야만 사이즈가 상승된다는군요...

제가 보기에는 비트수 문제인 것 같습니다만... (아 물론 비트수 에러는 안뜨지만요...)

자꾸 설정값이라나 뭐라나 사이트에 디비오류가 나는거 같던데 밤에 퇴근하고 한번 해봐야겠네요
제가 서버쪽에 초보라.. 검색해서 32비트제거하고 62비트로 설치하면 되나요?

답변을 작성하시기 전에 로그인 해주세요.
전체 3
© SIRSOFT
현재 페이지 제일 처음으로