Troubleshooting‎ > ‎

Q: What do I do if I see this error: "#1251 - Client does not support authentication protocol"?

Sometimes, installing connecting to MySQL from PHP, you will see this error:

#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

This error occurs when you are using are using MySQL 4.1+ with an older version of PHP. Thankfully, you don't have to upgrade anything :). Here's how to fix the problem:
  1. Open the command line, and run mysql, like this:

    mysql -u root -p

  2. Hit enter, type your password, hit enter again

  3. Run the following command (replace mypassword with your root password):

    SET PASSWORD FOR root@localhost = OLD_PASSWORD('mypassword');

  4. Hit enter. Try again,