国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

PHP 5 連接 mysql 5 的認(rèn)證協(xié)議問題

2024-07-24 12:56:06
字體:
供稿:網(wǎng)友

商業(yè)源碼熱門下載www.html.org.cn

mysql 4.1以后, 采用了一種新的用戶認(rèn)證協(xié)議, 對于老的客戶端會出現(xiàn)不支持認(rèn)證協(xié)議的錯(cuò)誤, 以下是官方網(wǎng)站的解決方法﹔



1upgrade all client programs to use a 4.1.1 or newer client library.



更新客戶端庫,這需要更新php的擴(kuò)展庫,對于老的api php已經(jīng)不提供了這樣的擴(kuò)展庫了



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



使用以前建立的賬號連接,對于在新的認(rèn)證協(xié)議下建立的賬戶就不行了



3reset 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.



這是一個(gè)不錯(cuò)的辦法,新建立的賬號采用老式的加密協(xié)議



4tell the server to use the older password hashing algorithm:

start mysqld with the --old-passwords option.



這樣新認(rèn)證協(xié)議的優(yōu)點(diǎn)就沒法使用了



5assign 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.


發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 萍乡市| 普兰县| 兰考县| 威信县| 长泰县| 德庆县| 青海省| 通化市| 吉安市| 巨野县| 勃利县| 林甸县| 余江县| 邻水| 绥棱县| 渝中区| 株洲市| 沅江市| 锡林浩特市| 景洪市| 苍山县| 广丰县| 易门县| 邹城市| 东城区| 阆中市| 攀枝花市| 通榆县| 隆子县| 基隆市| 喀喇| 襄汾县| 洞口县| 汕头市| 襄城县| 栾城县| 通山县| 扎囊县| 平远县| 胶州市| 太谷县|