I am using Magento ver-1.6.1.
When I try to connect DB Magento through the below error.
SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
My MySql DB was in another domain. I try to connect that db from local.
Thanks for your reply
I changed the DB password. Now it through a new error.
SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Your MySQL server uses an old authentication mechanism which mysqlnd is not able to comply with. mysqlnd needs the new 41 bytes password that was introduced with MySQL 4.1 (so you cannot connect to MySQL servers < 4.1). To update your user table to use the new password scheme you have to use the SET PASSWORD command on your MySQL server, e.g.:
SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘mypassword’);
This changes the password scheme and will allow you to connect with mysqlnd.