Occasionally, there is the need to move or migrate a PHP-Fusion installation. With the move there is a risk of getting the information for the database server set wrong, or there might be a problem with the SQL server. The following articles describes the database errors that you may see when encountering these issues with a PHP-Fusion installation.

Understanding Database Errors in PHP-Fusion

Database Connection Errors

Database Connection errors differ from authorization errors in that the error specifically states that it cannot connect through the network services used to connect to the database. Here's an example of a connection error:
Database Server not available.

This can mean that the database server is down and not running or the network connection is not allowing a connection server. Note that the database connection service is not operational is different from the server not running. This is also different from having the incorrect database information in the configuration file being unable to connect to the server - an authorization issue that is related database user name, password or database name issues.

How do I tell if my MYSQL server is not working?

Checking a VPS or Dedicated Server

The status of a MYSQL server can be directly determined only if you have access to the Web Host Manager (WHM) or root access to the server via a terminal client. Access to these options are only going to be available with a VPS or Dedicated server. When you have access to the secure shell terminal, the status messages for the server will look like this:

This error indicates that the service is running:

VPS or dedicated message showing that MYSQL service.

This error indicates that service is not running or service is unavailable:

VPS or dedicated message showing that MYSQL service.

If you are in the Web Host Manager (WHM), then you can also check Services to see if MYSQL services have been selected or phpMyAdmin to see if it will make a connection. If phpMyAdmin generates an error, then the mySQL service is not running. For more information on seeing if your SQL server is running, go to the article named Database connection error, or contact our Live Technical Support team available 24/7.


Checking a Shared Server

If you are on a shared server, you can also check the status of your server by simply looking at either the MySQL Database icon or by clicking on the phpMyAdmin service. If the service is not connected, then you will see an error appear (regardless of the login information that you use).



Database Connection Errors Caused by Database Authorization Errors

Authorization errrors are different from connection errors in that they specifically have to do with the incorrect database user, database password or database name being used in the parameters to connect to the database server. Here are some of the error messages that you may see:

Unable to select database

Unable to establish connection

These type of errors are easily corrected if you have access to config.php file. The following directions take you through editing the values in the config.php file using the Cpanel File Manager):
  1. Log into cPanel
  2. Scroll down the Files section and Click on the FILE MANAGER icon.
  3. Navigate in the File Manager until you get to the root of the PHP-Fusion installation files. Scroll down the list of files until youFind the CONFIG.PHP. Click to highlight the CONFIG.PHP file, then click on CODE EDIT in the top of the File Manager.
  4. Edit the Config FileWhen you edit the file you will be looking for all the database parameters to make sure that they are correct. These parameters include: database host (db_host), database user name (db_user), database password (db_pass), and the database name (db_name). If any of these parameters are misspelled or incorrect, then a database error will occur.
  5. Click on SAVE CHANGES in the top right hand corner to save any changes you may have made with the CONFIG.PHP file.

Database errors can appear mysterious and probably frightening to any novice who has not had much exposure to the way the PHP-Fusion (or any other database-backed program) works. However, with a little understanding of the helpful error messages, the problem can most likely be rapidly fixed. If you require assistance with checking on your database server or if you must make changes, please do not hesitate to contact the InMotion Hosting Technical Support team available 24/7.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 201650

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!