Why do I get "access denied" errors when trying to connect to MySQL? Print

  • 158

If you cannot connect to the MySQL server, this might happen due to several reasons:

  • Incorrect MySQL hostname. The MySQL hostname is localhost.

  • Incorrect MySQL username / password or database name. Please navigate to cPanel -> MySQL to check this information. If you cannot remember what password is set on the MySQL user, feel free to delete it and recreate it one more time.

  • You have not added the MySQL user to the database. This is a very common issue that people forget to do. In order to have a fully operational MySQL database you must also add a MySQL user to the MySQL database and assign full permissions. You can achieve this by clicking on the 'Add' button under 'cPanel' -> 'MySQL Databases' -> 'Add User To Database' section.

If you have any other issues with the MySQL connection after taking these steps, please let us know.


Was this answer helpful?

« Back

Copyright © H4Y Technologies LLC 2001-2023
All Rights Reserved