国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 子长县| 齐齐哈尔市| 当涂县| 高雄县| 龙川县| 金华市| 佛山市| 正镶白旗| 张家港市| 凤庆县| 读书| 南宫市| 黑山县| 苗栗市| 织金县| 竹山县| 乾安县| 沐川县| 左云县| 津市市| 娄烦县| 浮山县| 东平县| 凤庆县| 大方县| 阳山县| 石泉县| 屯门区| 贺州市| 潜江市| 广汉市| 阳新县| 石嘴山市| 固原市| 贵阳市| 浙江省| 霞浦县| 鲁山县| 漠河县| 依安县| 新绛县|