MYSQL出現(xiàn)" Client does not support authentication "的解決方法
MYSQL 幫助:
A.2.3 Client does not support authentication protocol
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> 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 PASSWORDstatement and theOLD_PASSWORD()function:mysql> SET PASSWORD FOR -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');Alternatively, useUPDATEandFLUSH 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:
- Start
mysqldwith the--old-passwordsoption. - 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 theHostandUservalues and assign a password using theOLD_PASSWORD()function and eitherSET PASSWORDorUPDATE, as described earlier.
- Start
For additional background on password hashing and authentication, see section 5.5.9 Password Hashing in MySQL 4.1.
相關(guān)文章
MYSQL出現(xiàn)" Client does not support authentication "的
MYSQL出現(xiàn)" Client does not support authentication "的解決方法...2007-06-06
MySQL數(shù)據(jù)庫SELECT查詢表達(dá)式解析
這篇文章主要介紹了MySQL數(shù)據(jù)庫SELECT查詢表達(dá)式解析,文中給大家介紹了select_expr 查詢表達(dá)式書寫方法,需要的朋友可以參考下2018-04-04
SQL查詢語句優(yōu)化的實(shí)用方法總結(jié)
下面小編就為大家?guī)硪黄猄QL查詢語句優(yōu)化的實(shí)用方法總結(jié)。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2016-12-12
MySQL存儲(chǔ)過程相互調(diào)用并獲得錯(cuò)誤碼示例
這篇文章主要介紹了MySQL存儲(chǔ)過程相互調(diào)用并獲得錯(cuò)誤碼,需要的朋友可以參考下2014-03-03
總結(jié)MySQL建表、查詢優(yōu)化的一些實(shí)用小技巧
本篇文章是對(duì)MySQL建表以及查詢優(yōu)化的一些實(shí)用小技巧進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-07-07
Mysql?8.4.0?結(jié)合?Docker?搭建GTID主從復(fù)制及傳統(tǒng)主從復(fù)制詳解
這篇文章主要介紹了Mysql?8.4.0?結(jié)合?Docker?搭建GTID主從復(fù)制,以及傳統(tǒng)主從復(fù)制,本文給大家講解的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友參考下吧2024-06-06

