apache+php4+mysql5 无法连接问题的解决。
来源:互联网 发布:网络安全法 二十一条 编辑:程序博客网 时间:2024/05/17 04:43
用了php4+mysql5盯点盯了3天最终结决。
这个是从chinaunix论坛上找到的杰决方案
"Client does not support authentication protocol requested by server"
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:
1。Upgrade all client programs to use a 4.1.1 or newer client library.
2。When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.
3。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 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.
4。Tell the server to use the older password hashing algorithm:
a。Start mysqld with the --old-passwords option.
b。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 the Host and User values and assign a password using the OLD_PASSWORD() function and either SET PASSWORD or UPDATE, as described earlier.
For additional background on password hashing and authentication, see section 5.5.9 Password Hashing in MySQL 4.1.
还有一个保证不会出现这个情况的方案,就是一开始编译 php 的时候指定安装的 mysql 的目录:--with-mysql=/path/to/mysql,不要仅用 --with-mysql(这样会使用 php 自带的 mysql 客户端,问题就在这里),在 php 的手册安装章节有提到这个内容。
- apache+php4+mysql5 无法连接问题的解决。
- 【MySQL】解决JDBC无法成功连接MySQL5.7的问题
- 解决Hibernate4连接MySQL5.5数据库无法自动创建表的问题
- 解决Hibernate4连接MySQL5.5数据库无法自动创建表的问题
- 解决Hibernate4连接MySQL5.5数据库无法自动创建表的问题
- 解决CentOS6.5下MySQL5.6无法远程连接的问题
- MAC下MYSQL5.7.17无法连接的问题
- MAC下MYSQL5.7.17无法连接的问题
- 解决Apache/PHP无法启动的问题
- 解决无法启动Apache的问题
- 解决Apache/PHP无法启动的问题
- 解决Apache/PHP无法启动的问题
- 解决Apache/PHP无法启动的问题
- 解决Apache/PHP无法启动的问题
- apache无法启动问题的解决
- 解决无法连接SQL2005数据库的问题
- 解决 win2003 远程桌面无法连接的问题
- 解决Dropbox无法连接的问题
- 收藏js--字体大小和简繁转换
- 拜托周杰伦,请不要强奸霍元甲!
- 实变函数--from 水木清华 (www.smth.org)
- 复变函数--from BBS 水木清华站
- 泛函分析--from BBS 水木清华站
- apache+php4+mysql5 无法连接问题的解决。
- 拓扑学 -- from BBS 水木清华站
- 本命年说狗(Chinese Foo Dog)
- 试论政府在产业群形成方面的地位和作用
- Unix类系统中/usr和/tmp的意思
- 钻石体系说
- 关于产业竞争力的内涵
- 竞争力综述
- 关于产业竞争力的评价指标