PDA

View Full Version : Không connect đc db MySQL 4.1x , xin chỉ dẫn !!!



RyTa
14-11-2005, 01:42
Mình đã thử nhiều source MySQL 4.1x nhưng cuối cùng vẫn ko connect đc và bị lỗi như sau :"#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client ", biết upgrade cái gì bi giờ hả các bạn ? :(
Ai biết đc lỗi này xin chỉ giúp mình với . Xin cám ơn rất nhiều !

Ryta .

mercuryatsky
17-11-2005, 00:45
mình cũng gặp tình trạng na ná như vậy
mình làm theo hướng dẫn trong sách "xây dựng ứng dụng web bằng php và mySql" đến khi connect để tạo cơ sở dữ liệu thì ko được! có bạn nào biết giúp mình cái đi!

dauvit
17-11-2005, 03:17
PHP and MySQL 4.1: Connection problems

Warning: mysql_connect(): Client does not support authentication protocol requested by server

Turns out that MySQL 4.1+ now uses longer and stronger SHA1 password hashes. This is a good thingTM because MD5 is not long-term secure as has been shown recently.1

For MySQL and PHP users, this change in password hashing complicates some setups. PHP 5+ programs won't have problems if they use the mysqli function calls. PHP 4, however, has pre-MySQL 4.1 clients so they won't be able to connect to new MySQL servers with the newer password hashes. The gory details can be seen here.

Enough with the techno-babble. You have two options:

1. Run MySQL 4.1+ using the --old-passwords options.
2. Explicitly issue MySQL commands to set the password to old password hashes. This can be done using the OLD_PASSWORD('your_passwd') as in the following:

SET PASSWORD FOR 'user'@'host' = OLD_PASSWORD('user_password');

This SQL command replaces the user's password with the older 14-byte MD5 password hash that older PHP-MySQL clients can deal with.

RyTa
23-11-2005, 10:58
Cách của bạn dauvit mình search trên Net và thử rồi , có hiệu lực ngay , nhưng kinh khủng nhất 1 chỗ : khởi động máy lại là MySQL ko nhớ pass cũ . Sau đó mình connect vô db bằng command , nhập đúng password đó nó cũng ko cho vào luôn .
Thiệt ko tin nổi cái MySQL này rối rắm đến thế :(