블로그 이미지
Rootrator
1개를 알면 모르는 10개가 튀어나온다..!

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

2011. 2. 28. 15:06 Mysql

Client does not support authentication protocol requested by server; consider upgrading MySQL client

 

에러가 뜬다. 뭐지..짜증난다

 

mysql 4.0 이하와 4.1이상버전은 암호화방식 차이로 인해 4.0버전에서 password테이블을 가져와도 인식하지 못한다.

 

상위버전 DB서버에 INSERT TABLE USER에서 old_password()해 비밀번호를 넣거나

/etc/my.cnf에서 [mysqld] 구문 밑에 old_passwords=1 추가해주면 된다.

아니면 아예 구동할때 --old-passwords 옵션을 넣어버려도 된다.

4.X버전을 쓰던 홈페이지를 5.X버전을 쓰는 서버 이전할 경우 홈페이지 소스에서

로그인 쿼리를 변경해줘야 한다.

 $result = mysql_query("select * from $member_table where $id_name='$user_id' and $password_name=password('$password')") or error_msg(mysql_error());

이 줄을 다음과 같이 변경 

 $result = mysql_query("select * from $member_table where $id_name='$user_id' and $password_name=old_password('$password')") or error_msg(mysql_error());

반응형
posted by Rootrator