If you get this error when trying to connect to mysql through php, it means that php was compiled with a client verison older than the version of the mysql server you're running.
#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client
Basically, it doesn't know the new language to be able to talk with the server, so it denied access.You can check to see what version is compiled into php by creating an file called:
/var/www/html/info.php
in it, place the following code:
<? phpinfo(); ?>
Then view this file from your server IP:http://1.2.3.4/info.php
Scroll down to the mysql section, and view the "MySQL Client" portion. Â It will tell you what version is compiled into php. Â The version (if correct) will match the version of mysql you're running.
If it doesn't match, php must be recompiled with the current version of mysql.
1) First ensure you have the require rpms:
[root@server ~]#Â rpm -qa | grep MySQL
MySQL-server-4.1.12-1
MySQL-client-4.1.12-1
MySQL-shared-4.1.12-1
MySQL-devel-4.1.12-1
[root@server ~]#
2) Then ensure that your php configuration is correct.
[root@server root]# cd /usr/local/directadmin/customapache
[root@server customapache]# grep mysql configure.php
--with-mysql=/usr \
[root@server customapache]#
./build clean
./build php n