All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
详细阐述PHP环境下如何将gbk编码转成utf8格式_[PHP教程]
XML加ASP实现网页“本地化”_[XML教程]
ASP.Net中利用CSS实现多界面两法_[Asp.Net教程]
PHP 开发程序加速运行探索之慢代码优化方法_[PHP教程]
微软.Net开发中的多线程编程总结_.net资料_编程技术
ASP.NET程序中常用的三十三种代码2_[Asp.Net教程]
ASP.NET实例:增强,GridView,控件的功能(二)_[Asp.Net教程]
浅谈当下网页设计趋势_优化技巧_seo学堂
点缩略图弹出随图片大小自动调整的页面_[Asp.Net教程]
Varchar与char的区别_[SQL Server教程]
Reading number is top 10 pictures
Exquisite decoration is not paying too much2
Breasts woman big set 2
Players in the eyes of a perfect love1
A letter to parents choose world of warcraft seven big reason
人美胸美腿更美3
狗狗与主人神同步1
如果没有好报,为什么要做好人?
So beauty, will let you spray blood1
沙漠里的美女
囚犯暴乱了咋办?
Download software ranking
Prostitutes diary
SP3 for SQL2000
少妇苏霞全本
Tram sex maniac 2 (H) rar bag3
Tram sex maniac 2 (H) rar bag11
Unix video tutorial3
Sora aoi 120 minutes
VC++6.0简体中文版
Boxer Classic video1
Popkart Cracked versions Mobile phone games
aaa published in(发表于) 2013/12/21 22:24:36 Edit(编辑)
PHP5连接Mysql5的认证协议问题_php资料_编程技术

PHP5连接Mysql5的认证协议问题_php资料_编程技术

PHP5连接Mysql5的认证协议问题_php资料_编程技术-你的首页-uuhomepage.com
MYSQL 4.1以后, 采用了一种新的用户认证协议, 对于老的客户端会出现不支持认证协议的错误, 以下是官方网站的解决方法﹔

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

更新客户端库,这需要更新PHP的扩展库,对于老的api PHP已经不提供了这样的扩展库了

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

使用以前建立的账号连接,对于在新的认证协议下建立的账户就不行了

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.

这是一个不错的办法,新建立的账号采用老式的加密协议

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

Start mysqld with the --old-passwords option.

这样新认证协议的优点就没法使用了

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.

恢复已经升级了口令到老样式。




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.