My application cannot connect to my database.

If your application cannot connect to the database you should make sure that:

  • Your application is using the correct MySQL hostname: localhost
  • Your application is using the correct MySQL database / username / password.
  • Don't forget to specify your MySQL username and database with the prefix yourusername_ in front of its given name. For example, your cPanel username is black and you have named your database white. In this case you have to refer to your database as black_white;
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to solve “Reported Attack Site!” ?

If you see this on your website, it means your website is already compromised and flagged by...

HTTP Error – Bad Gateway

This error indicates a server side problem. Please log in your Client Area and check if there are...

HTTP error codes explained

There are multiple HTTP codes that you may come across. Below you can find a summary of the most...

I’m getting a ‘MySQL server has gone away’ error in my application

There are two main reasons for this error message to show:1) The MySQL query you are trying to...

Site shows PHP warnings / errors

PHP warnings / errors show for various reasons. In case you get such PHP messages on your...