mysql old-password...

Posted 2007/01/19 19:13 by 지도군

B.2.3. Client does not support authentication protocol

MySQL 5.1 uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients. If you upgrade the server from 4.0, attempts to connect to it with an older client may fail with the following message:

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

To solve this problem, you should use one of the following approaches:

  • Upgrade all client programs to use a 4.1.1 or newer client library.

  • When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.

  • Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

    mysql> SET PASSWORD FOR
        -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
    

    Alternatively, use UPDATE and FLUSH PRIVILEGES:

    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
        -> WHERE Host = 'some_host' AND User = 'some_user';
    mysql> FLUSH PRIVILEGES;
    

    Substitute the password you want to use for “newpwd” in the preceding examples. MySQL cannot tell you what the original password was, so you'll need to pick a new one.

  • Tell the server to use the older password hashing algorithm:

    1. Start mysqld with the --old-passwords option.

    2. Assign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query:

      mysql> SELECT Host, User, Password FROM mysql.user
          -> WHERE LENGTH(Password) > 16;
      

      For each account record displayed by the query, use the Host and User values and assign a password using the OLD_PASSWORD() function and either SET PASSWORD or UPDATE, as described earlier.


      from :: http://dev.mysql.com/doc/refman/5.1/en/old-client.html

Creative Commons License

'Just Computing.' 카테고리의 다른 글

GRUB 배경 설정  (1) 2007/07/04
비스타, 마무리.  (0) 2007/02/01
비스타 설치하기  (0) 2007/02/01
구글봇 강림  (0) 2007/01/28
mysql old-password...  (1) 2007/01/19

Tag :

  1. Favicon of http://dohyuni.net BlogIcon dohyuni

    | 2007/01/22 15:41 | PERMALINK | EDIT | REPLY |

    기존의 php, 또는 접근 프로토콜로는 4.1 이상의 MySQL 서버에는 접근 불가능.
    구버전의 MySQL 서버를 쓰면 해결 가능하지만
    더 이상 MySQL 에서 릴리즈 다운로드를 제공하지 않는터라
    바이너리 버전 외의 소스 버전은 구하기 어렵고...
    결국은 이제 신버전을 고려해서 준비해야함..

    가장 간단한 방법은 위의 설명대로 MySQL 을 서비스가 아닌 데몬으로
    --old-password 옵션과 함께 rc.local 에 넣어서 실행..
    하지만 서비스로 도는게 아니면 왠지 맘에 안드는군 -ㅠ-

    그런데 이렇게 해서 과연 그 문제가 해결될지는....;;
    결국은 약간(?)의 해싱함수 차이일텐데...............

Write your message and submit
« PREV : 1 : ... 80 : 81 : 82 : 83 : 84 : 85 : 86 : 87 : 88 : ... 93 : NEXT »