本页主题: Use MySQL 4.1.0 alpha with older clients(PHP连接MySQL4.1/5.0的方法) 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

Mike
群熵工程师
级别: 管理员


精华: 7
发帖: 951
威望: 714 点
金钱: 6601 RMB
贡献值: 0 点
好评度: 611 点
在线时间:1405(小时)
注册时间:2003-11-28
最后登录:2018-04-23

 Use MySQL 4.1.0 alpha with older clients(PHP连接MySQL4.1/5.0的方法)

If you get an
ERROR 1249: Client does not support authentication protocol requested by server. Consider upgrading MySQL clientand you are not able or willing to upgrade all your client programms...

There is a very easy way to make your new Server compatible with older clients (like PHP, MyCC, phpMyAdmin, etc)
First install all the programs you want to use from your distribution to make sure all clients are the same and working, most likely you will have to install MySQL 3.23 for that. When you have everything up and running you can install Version 4.0.x or 4.1, follow the directions from
http://www.mysql.com/doc/en/Upgrading-from-3.23.html
http://www.mysql.com/doc/en/What-to-do-from-4.0.html

Read
http://www.mysql.com/doc/en/Password_hashing.html
most likely you will want to start your server with the --old-passwords option for now.
(I stil have to try if you can safely put it into /etc/my.cnf)

See http://www.mysql.com/doc/en/Command-line_options.html for other command line options.

If you are already locked out of your server because of incompatible passwords (long password in database and only old clients).
You can use this document for resetting the passwords.
http://www.mysql.com/doc/en/Resetting_permissions.html
顶端 Posted: 04-09-04 13:28 | [楼 主]
Mike
群熵工程师
级别: 管理员


精华: 7
发帖: 951
威望: 714 点
金钱: 6601 RMB
贡献值: 0 点
好评度: 611 点
在线时间:1405(小时)
注册时间:2003-11-28
最后登录:2018-04-23

 

在MySQL4.1/5.0上创建一个用户后,使用的是长加密方式。使用Java或C(通过MyODBC)连接并不会出现问题,但是PHP就不行。PHP的连接库只支持老的短加密方式。这时候需要执行一句命令行即可:
C:\MySQL5.0\bin>mysqladmin -u username -p{password} old-password {password}
其中username是你新建的用户,{password}是他的密码。
顶端 Posted: 05-08-30 09:59 | 1 楼
帖子浏览记录 版块浏览记录
群熵信息 - 技术讨论区 » 数据库相关

Total 0.012804(s) query 5, Time now is:10-19 13:09, Gzip enabled
Powered by PHPWind v6.3.2 Certificate Code © 2003-08 PHPWind.com Corporation

上海服务器租用 杭州世导双线服务器托管 云主机 VPS