I am trying to remotely connect to MySQL server online from my local machine, but I am getting the following error:
Warning: PDO::__construct(): The server r
I overcame the challenge. I found out that my remote MySQL database host still uses the old MySQL password hash which is 16-byte, while my localhost database server uses 41-byte password hash. I used the following query to find the password length:
SELECT PASSWORD('mypass')
I changed my localhost database server password hash to 16-byte by running the following query
SET GLOBAL old_passwords = 1;
Then I edited my.ini file, and set the old_password=1 to ensure that when the server restarts, it won't revert to the new password system. But that didn't solve my problem.
I figured out that it was PHP that handles the authentication, since I was using PHP's MySQL API, so I downgraded to PHP 5.2.8 and I was able to make the remote connection successfully.
I hope this helps someone.