Difference between revisions of "Unable to connect to the database"

From Joomla! Documentation

(Corrected list numbering. Corrected misspellings.)
Line 2: Line 2:
  
 
{{review}}
 
{{review}}
 +
== Unable to Connect to the Catabase: Could Not Connect to MySQL ==
 +
If during or after installation, you received "'''Unable to connect to the database'''" error, verify that you have entered your MySQL database details correctly. The installation script will not allow you to continue unless the details are correct.
  
 
+
If the failure occurs after moving your site to another host, check the following items of your ''configuration.php'' file. The normal database settings are the following:
== Unable to connect to the database: Could not connect to MySQL ==
+
<pre>
 
 
 
 
 
 
If during or after installing, you received "'''Unable to connect to the database'''" error, please check the you have entered your sql database details correctly. The installation script will not allow you to continue unless the details are correct.
 
 
 
If it occurs after moving your site to another host, then please check following section of your configuration.php file
 
 
 
The normal database settings are the following:
 
<pre>
 
 
var $dbtype = 'mysql';
 
var $dbtype = 'mysql';
var $host = 'localhost';
+
var $host = 'localhost';
var $user = 'user_with_database_access';
+
var $user = 'user_with_database_access';
var $db = 'the_actual_database_name';
+
var $db = 'the_actual_database_name';
var $dbprefix = 'table_prefix_';
+
var $dbprefix = 'table_prefix_';
 
</pre>
 
</pre>
  
== The most common reason ==
+
== The Most Common Reasons ==
Sometimes you will see this message is that MySQL has stopped running on your server. Often this is a temporary situation. Your server administrator may sometimes turn MySQL off to run maintenance utilities. In such circumstances, your site will likely return shortly.
+
# Sometimes you will see this message if MySQL has stopped running on your server. Your server administrator may temporarily turn MySQL off to run maintenance utilities. In such circumstances, your site will likely return shortly.
 
+
# Your database user has been deleted. If this is the case, you will need to recreate your database user with the same username and password that existed when you first installed Joomla. Use your domain control panel to administer this or contact your server administrator.
1) Your Database User has been deleted. If this is the case, you will need to recreate your database user with the same username and password that existed when you first installed Joomla. Use your domain control panel to administer this or contact your server administrator.
+
# Your database username or password has changed.
 
 
2) Your Database User Name or User Password has changed.
 
 
 
  
 
[[Category:FAQ]]
 
[[Category:FAQ]]

Revision as of 22:34, 19 January 2010

<startFeed />

Copyedit.png
This Article Needs Your Help

This article is tagged because it NEEDS REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.
More pages that need help similar to this one are here. NOTE-If you feel the need is satistified, please remove this notice.


Unable to Connect to the Catabase: Could Not Connect to MySQL[edit]

If during or after installation, you received "Unable to connect to the database" error, verify that you have entered your MySQL database details correctly. The installation script will not allow you to continue unless the details are correct.

If the failure occurs after moving your site to another host, check the following items of your configuration.php file. The normal database settings are the following:

var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'user_with_database_access';
var $db = 'the_actual_database_name';
var $dbprefix = 'table_prefix_';

The Most Common Reasons[edit]

  1. Sometimes you will see this message if MySQL has stopped running on your server. Your server administrator may temporarily turn MySQL off to run maintenance utilities. In such circumstances, your site will likely return shortly.
  2. Your database user has been deleted. If this is the case, you will need to recreate your database user with the same username and password that existed when you first installed Joomla. Use your domain control panel to administer this or contact your server administrator.
  3. Your database username or password has changed.

<endFeed />