HOME > PHP > PHP Forum > Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:\inetpub\wwwroot\counter\connect.php on line 7
ติดต่อกับฐานข้อมูล Mysql ไม่ได้
<?
$host="localhost";
$username="root";
$pass_word="11102409";
$db="counter";
$tb="counter";
mysql_connect( $host,$username,$pass_word) or die ("µÔ´µè͡Ѻ°Ò¹¢éÍÁÙÅ Mysql äÁèä´é ");
mysql_select_db($db) or die("àÅ×Í¡°Ò¹¢éÍÁÙÅäÁèä´é...");
?>
Tag : - - - -
Date :
10 พ.ค. 2548 20:57:37
By :
LuciferX
View :
3164
Reply :
5
No. 1
Guest
run mysql command line
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
'some_user' ให้แทนด้วย username นะครับ
'some_host'ให้แทนด้วย mySQL server โดยปกติคือ localhost
newpwd = คือ password ใหม่
เหตุที่เกิ error ก็เพราะว่า
"
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 "
Date :
11 พ.ค. 2548 09:30:58
By :
surenus
No. 2
Guest
เพิ่มเติม
เพราะ php 4.x ไม่ support MySQL 4.1.x ครับ