The 'Cannot connect to the database server ' error

This error means that a PHP script cannot connect to your MySQL server. CS-Cart may not connect to the database server due to the MySQL server overload or inaccessibility at the moment. For example, this problem may be caused by the fact that your server administrator is maintaining the MySQL server at the moment. Also the problem may be caused by the incorrect credentials to your database.

  1. Check your MySQL credentials in the config.php file located in the root CS-Cart directory. You should check the values of the following variables:
    $db_host = 'NNNNNNNN';
    $db_name = 'NNNNNNNN';
    $db_user = 'NNNNNNNN';
    $db_password = 'NNNNNNNN';
  2. If these values are correct and you are still getting this error contact your server administrator.

Noticed an error in the article or it is not clear enough? Any suggestions to improve it? Please let us know by filling in the feedback form. Click here.