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.
恢复已经升级了口令到老样式。
0
0
本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门AI工具
相关专题
2026赚钱平台入口大全
2026年最新赚钱平台入口汇总,涵盖任务众包、内容创作、电商运营、技能变现等多类正规渠道,助你轻松开启副业增收之路。阅读专题下面的文章了解更多详细内容。
27
2026.01.31
无需付费的漫画app大全
想找真正免费又无套路的漫画App?本合集精选多款永久免费、资源丰富、无广告干扰的优质漫画应用,涵盖国漫、日漫、韩漫及经典老番,满足各类阅读需求。阅读专题下面的文章了解更多详细内容。
16
2026.01.31
漫画免费在线观看地址大全
想找免费又资源丰富的漫画网站?本合集精选2025-2026年热门平台,涵盖国漫、日漫、韩漫等多类型作品,支持高清流畅阅读与离线缓存。阅读专题下面的文章了解更多详细内容。
2
2026.01.31
php如何运行环境
本合集详细介绍PHP运行环境的搭建与配置方法,涵盖Windows、Linux及Mac系统下的安装步骤、常见问题及解决方案。阅读专题下面的文章了解更多详细内容。
0
2026.01.31
php环境变量如何设置
本合集详细讲解PHP环境变量的设置方法,涵盖Windows、Linux及常见服务器环境配置技巧,助你快速掌握环境变量的正确配置。阅读专题下面的文章了解更多详细内容。
0
2026.01.31
热门下载
相关下载
精品课程
相关推荐
/
热门推荐
/
最新课程





