> php教程 > php手册 > 본문

Client does not support authentication protocol 解决方案

WBOY
풀어 주다: 2016-06-13 10:27:16
원래의
1799명이 탐색했습니다.

来源: http://dev.mysql.com/doc/mysql/en/Old_client.html
MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. If you upgrade the server to 4.1, attempts to connect to it with an older client may fail with the following message: shell> mysqlClient does not support authentication protocol requestedby 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 youll need to pick a new one. Tell the server to use the older password hashing algorithm: Start mysqld with the --old-passwords option. 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.


For additional background on password hashing and authentication, see section 5.5.9 Password Hashing in MySQL 4.1.
来源:http://dev.mysql.com/doc/mysql/en/Old_client.html
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 추천
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!