Database Error: Unable to connect to the database: Could not connect to MySQL

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
pbarclay
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Nov 26, 2008 3:53 pm

Re: Database Error: Unable to connect to the database: Could not

Post by pbarclay » Fri Nov 28, 2008 1:41 pm

I know this thread is quite old but I just like to add that I have just moved my Joomla 1.5 site from my local computer to my new hosting with a standard LAMP environment....

Once I had everything moved and configured I tried to connect to the site and got the failed to connect to MySql Database error.

After double checking the values I had entered in configuration.php where correct, I checked them again just to make sure and they were correct.

The problem was I auto generated my MySql password from the CPanel and it contained a bunch of non standard characters - changing the password to the database to something more simple fixed the connection problem.

It their a bug with the character handling for the password in Joomla 1.5?

Anyway better late than never.

PB

MianSam
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Dec 24, 2008 7:06 am

Re: Database Error: Unable to connect to the database: Could

Post by MianSam » Wed Dec 24, 2008 7:13 am

I am also getting the following error "Unable to connect to the database:Could not connect to MySQL".
Not knowing any different, I have already uninstalled and reinstalled MAMP and MAMP Pro but to no avail. Please someone help!

User avatar
shobuz99
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Sat Jan 03, 2009 2:02 am

Re: Database Error: Unable to connect to the database: Could not

Post by shobuz99 » Sat Jan 03, 2009 6:28 pm

ircmaxell wrote:
dumblonde wrote:I successfully installed Joomla and I, too kept having this issue. It was not a Joomla issue or an issue regarding passwords, etc. (I am with hostgator), and my issue is that I get the message that there is php connection error to the MySql database (there is a similar error message with Perl).

In PHPmyAdmin, I have a "no privledges" RED message next to the "create database" menu.

I had no issues with using Joomla on my Apache server on my computer, but trying to load Joomla on a web server seems to be another issue.

I have contacted hostgator, and so far, all they have been able to do is submit a trouble ticket to try to fix this. I did have them upgrade php to 5.2.2. from 4.4.4, so no idea if that is the problem.

The customer service guy on the phone had the same issue...I will post if/when this gets resolved.
...................................................
I have to say, that I am not completely convinced that I love Joomla. I still don't see how I will be able to make my web pages look and perform how I want. I like more control and flexibility...we will see. I am a COMPLETE newbie, but used to using CSS and Dreamweaver to do A LOT AND Make great looking sites that work great and are highly search able...I just need to be able to give my clients the ability to control SOME of the site....we will see....
This problem is normally a permissions issue... You can test that out by creating a new php file with the following code

Code: Select all

<?php
$host = 'localhost';
$user = 'mysqluser';
$pass = 'mypass';
$db = 'databasename';

//Don't change below here
$conn = mysql_connect($host, $user, $pass);
mysql_select_db($db, $conn);
echo '<hr />anything above this linebreak is BAD!';
Be sure to change the top 4 vars to be your info... If you get any errors above the outputted line, get your host involved, and show them this file...
hello..
I'm new to this forum, and this particular thread because I'm having the same problem:
If I try to install Joomla! 1.5.8, I get to step 4 and I get the error "Unable to connect to the database:Could not connect to MySQL".
I have tried several fixes.
1) I have checked and re-checked PhpMyAdmin to make sure that the MsqL5 is correctly setup,
2) that the DB was setup correctly
3) that the user was setup correctly with the correct password
4) that the DB specific privleges were granted for the user; but not Global privleges
5) I have used your previous php code and named it tester.php and run it.
The output is simply a horz line and below the line the text "anything above this linebreak is BAD!"
No other errors.
6) I have deleted the installation folder from the server, because Joomla complained that it needed to be removed before it went any further. I still get the message: "Database Error: Unable to connect to the database:Could not connect to MySQL"

The server contains web pages and files for a different web page.
I am trying to install Joomla from a subfolder...is that a problem?

I am using the Joomla Magic 1.5 tutorial package to learn this.
So far I think I've done everything correctly. It seems simple enough.

What is my next step? Should I uninstall/delete joomla from the server and delete the MSQL5 and
DB from the server and start all over again?
I have no idea what to do next.

Help!

Rick (shobuz99)

MianSam
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Dec 24, 2008 7:06 am

Re: Database Error: Unable to connect to the database: Could not

Post by MianSam » Sat Jan 03, 2009 6:40 pm

After much research and reading and fretting, the solution to my problem to the error "Unable to connect to the database:Could not connect to MySQL" was a very simple one - somehow the admin password got changed. Not surprisingly, I don't think I did anything to change the password - at least not purposely. Regardless entering the new PW fixed the problem and I am able to set up Joomla.

User avatar
shobuz99
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Sat Jan 03, 2009 2:02 am

Re: Database Error: Unable to connect to the database: Could not

Post by shobuz99 » Sat Jan 03, 2009 7:37 pm

MianSam wrote:After much research and reading and fretting, the solution to my problem to the error "Unable to connect to the database:Could not connect to MySQL" was a very simple one - somehow the admin password got changed. Not surprisingly, I don't think I did anything to change the password - at least not purposely. Regardless entering the new PW fixed the problem and I am able to set up Joomla.
Would you be willing to share the steps of your fix and what you mean as 'admin password'?

I'm afraid I've tried so many things that I've possibly changed something that I originally setup,
and don't remember going back to that step...know what I mean?

Thanks

Rick (shobuz99)

User avatar
binachank
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Wed Sep 20, 2006 3:33 pm
Location: Surabaya
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by binachank » Wed Jan 07, 2009 5:05 pm

I have the same problem here...
But, after I create a new mysql user (with new password) and synchronize with configuration.php file, the problem is gone.
So, my conclusion is I haven't put the right username and password at configuration.php file. Please check your username and password again.
If you are not sure enough, please create the new one....

Thanks,
Everything that can't kill you only make you stronger!

User avatar
shobuz99
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Sat Jan 03, 2009 2:02 am

Re: Database Error: Unable to connect to the database: Could not

Post by shobuz99 » Wed Jan 07, 2009 6:02 pm

binachank wrote:I have the same problem here...
But, after I create a new mysql user (with new password) and synchronize with configuration.php file, the problem is gone.
So, my conclusion is I haven't put the right username and password at configuration.php file. Please check your username and password again.
If you are not sure enough, please create the new one....

Thanks,
binachank,
Thank you for the advice. I was able to solve my proble the same way you did.
Apparently, I had a wrong password, that conflicted with my connection to the DB.
once I made sure they were the same pw, it worked.
This one is solved for me.

Rick (shobuz99)

User avatar
Nico1958
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Mon Dec 01, 2008 11:32 am

Re: Database Error: Unable to connect to the database: Could not

Post by Nico1958 » Mon Jan 12, 2009 9:28 pm

Had the same problem with a clean installation of joomla 1.5.9. This is what happened to me: when I created the database I wrote down the database name and username. Filled out these names in Joomla and clicked on next in the Joomla setup screen. Then got the above problem/message of Joomla not being able to connect. Well I found out that the database (mysql) adds/changes the names of the database and user after you've created them. So I copied these by the database altered names and pasted them in Joomla setup. Problem solved. Hope it will help someone here.
Cheers Nico

vjtemplates
Joomla! Explorer
Joomla! Explorer
Posts: 314
Joined: Sat Dec 27, 2008 6:16 am
Location: LA
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by vjtemplates » Tue Jan 13, 2009 12:14 am

Nico1958 wrote:Well I found out that the database (mysql) adds/changes the names of the database and user after you've created them.
Unless you install locally, most web hosting will automatically add the unix user account as a prefix to database name and username.
Joomla Templates & VirtueMart Themes

http://www.vjtemplates.com

User avatar
keefrichards
Joomla! Explorer
Joomla! Explorer
Posts: 366
Joined: Tue Aug 12, 2008 9:04 am
Location: Sydney, Australia

Re: Database Error: Unable to connect to the database: Could not

Post by keefrichards » Thu Jan 15, 2009 11:14 pm

Yeah, I've just got the same problem at a most critical time. A meeting to show client website in 2 hours time and I get this.
"Database Error: Unable to connect to the database: Could not connect to MySQL"

Can't connect to the Cpanel, MYSQL, MY Admin or Website

I contacted the host who said they've got the problem and will have it fixed within 15 minutes (sounds like wishfull thinking to me). Anyway, I'm not going to touch a thing for 10 minutes then see what happens. It just feels like I've got not control over this side of things.

Damn it.
I'm totally hamstrung and at the mercy of the HOST. Not happy Janet! :eek:
It's great to be here......in fact,.....it's great to be anywhere!

User avatar
jessiered
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Sat Jan 10, 2009 4:50 am

Re: Database Error: Unable to connect to the database: Could not

Post by jessiered » Fri Jan 16, 2009 3:10 am

Hi Everyone!

I am very new to Joomla and I also encountered this "Unable to connect to the database:Could not connect to MySQL" problem. I hope someone out there will give me a step to step idea on how to deal with it.
By the way in the Pre Installation check, my Display Errors is still ON. And I tried to go to the php.ini but it said there that it is OFF. So I was just thinking if this had to do with the problem about the Database.

Oh please help me.
Thanks in advance.

Jessie
D * Jessiered * Smile
:: Never Finish a Negative Statement ::

cipherd
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Oct 08, 2007 5:12 am

Re: Database Error: Unable to connect to the database: Could not

Post by cipherd » Mon Feb 02, 2009 7:30 pm

jessiered wrote:Hi Everyone!

I am very new to Joomla and I also encountered this "Unable to connect to the database:Could not connect to MySQL" problem. I hope someone out there will give me a step to step idea on how to deal with it.
By the way in the Pre Installation check, my Display Errors is still ON. And I tried to go to the php.ini but it said there that it is OFF. So I was just thinking if this had to do with the problem about the Database.

Oh please help me.
Thanks in advance.

Jessie
Actually looking back at an old post I read where the characters in your database name could be the problem. Some hosts have restrictions on how long a name can be. I simply made the database name shorter as well as the username shorter and that fixed the problem. Instead of using 10 or more characters I just used like a number right after the hostname. For example hostname_2 as username name and hostname_2 as the database name.

2md
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Sun Mar 01, 2009 12:47 am

Re: Database Error: Unable to connect to the database: Could not

Post by 2md » Thu Mar 05, 2009 1:57 am

hello ..i am getting the same error .. i am only trying to install on my laptop and not on a remote host .. i installed once with success before but becasue i had left the "password" blank, i had to delete everything and reinstall again and that's when i started getting the database error .. i have read all the above posts but my knowledge is very limited .. can anyone be kind enough to explain what the issue is and step by step procedure to resolve it .. I have been trying for 2 nights and just can't figure it out .. i don't want to gove up now! thanks all for your help.

mastix
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Mar 15, 2009 1:09 pm

Re: Database Error: Unable to connect to the database: Could not

Post by mastix » Tue Mar 31, 2009 2:19 pm

I had the same error "Unable to connect to the database:Could not connect to MySQL" after installing a joomla template on another domain in the same hosting company (Hostgator). I created another MySql database and I think HERE COMES THE MISTAKE I GAVE THE SAME USERNAME to this database. After that I could not access any of my two sites.
So here is what I did:

1- Delete the new created database and site (the main one was the important one so I din't want to mess things up
2- I deleted the username (in the case it had been corrupted) created a new one with all the privileges on- by the way-(I named it the same as before so I had not to touch the PhpmyAdmin)
3- Voila!!! everything was back to normal

So big lesson is: DO NOT GIVE THE SAME USERNAME TO DIFFERENT DATABASES....you risk the dreaded "Unable to connect to the database: Could not connect to MySQL" message

Hope my experience is of any help

best

Cristian

ichiokada
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Feb 20, 2009 1:38 pm

Re: Database Error: Unable to connect to the database: Could not

Post by ichiokada » Wed Apr 08, 2009 4:54 am

I had this error before.
I found out that because I had changed my database password when configuring a new joomla site on same host. & forgot that I have to change the password in other joomla sites configuration.php

after all password on all sites have been set same. it is fine.


hope this helps

iddant
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Apr 26, 2009 2:43 pm

Re: Database Error: Unable to connect to the database: Could not

Post by iddant » Sun Apr 26, 2009 2:48 pm

Hi,

I'm having the same issue trying to install Joomla 1.5.10 on a Unix and have the same "Unable to connect to the database:Could not connect to MySQL"
it's on mu host provider so I cant run anything in the SQL.
I only have the user name, password and DB name.
:'( :'( :'( :'( :'( :'( ??? ??? ???
please advice.....

Thanks

User avatar
keefrichards
Joomla! Explorer
Joomla! Explorer
Posts: 366
Joined: Tue Aug 12, 2008 9:04 am
Location: Sydney, Australia

Re: Database Error: Unable to connect to the database: Could not

Post by keefrichards » Tue Apr 28, 2009 12:48 am

iddant wrote:Hi,

I'm having the same issue trying to install Joomla 1.5.10 on a Unix and have the same "Unable to connect to the database:Could not connect to MySQL"
it's on mu host provider so I cant run anything in the SQL.
I only have the user name, password and DB name.
:'( :'( :'( :'( :'( :'( ??? ??? ???
please advice.....

Thanks
You need to contact your host. I'm certain it's a problem at their end.
Good luck.
keef
:eek:
It's great to be here......in fact,.....it's great to be anywhere!

andyvely
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 29, 2009 6:19 am

Re: Database Error: Unable to connect to the database: Could not

Post by andyvely » Wed Apr 29, 2009 6:35 am

Hi, i have the same problem, here is my configuration.php code,can anyone correct the bad info on it?
<?php
class JConfig {
var $offline = '0';
var $editor = 'tinymce';
var $list_limit = '20';
var $helpurl = 'http://help.joomla.org';
var $debug = '0';
var $debug_lang = '0';
var $sef = '0';
var $sef_rewrite = '0';
var $sef_suffix = '0';
var $feed_limit = '10';
var $secret = 'kJpGoMJGG8gOwOYt';
var $gzip = '0';
var $error_reporting = '-1';
var $xmlrpc_server = '0';
var $log_path = '\home\logs';
var $tmp_path = '\home\logs\tmp';
var $live_site = '';
var $force_ssl = '0';
var $offset = '0';
var $caching = '0';
var $cachetime = '15';
var $cache_handler = 'file';
var $memcache_settings = array();
var $ftp_enable = '0';
var $ftp_host = '127.0.0.1';
var $ftp_port = '21';
var $ftp_user = '';
var $ftp_pass = '';
var $ftp_root = '';
var $dbtype = 'mysql';
var $host = 'ftp.emeraldesire.com';
var $user = 'xxxxxxxx';
var $db = 'xxxxxxxx';
var $dbprefix = 'jos_';
var $mailer = 'mail';
var $mailfrom = '[email protected]';
var $fromname = 'www.emeraldesire.com';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'localhost';
var $MetaAuthor = '0';
var $MetaTitle = '0';
var $lifetime = '15';
var $session_handler = 'database';
var $password = 'xxxxxxxx';
var $sitename = '::: www.emeraldesire.com :::';
var $MetaDesc = '';
var $MetaKeys = '';
var $offline_message = 'El sitio está desactivado por tareas de mantenimiento Por favor, vuelva más tarde.';
}
?>

I've been reading the "Database Error: Unable to connect to the database:Could not connect to MySQL" sign fr two days...

shaznikader
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Wed May 06, 2009 8:16 am

Re: Database Error: Unable to connect to the database: Could not

Post by shaznikader » Wed May 06, 2009 8:19 am

Hai everyone..
Im having same problem too,'Database Error: Unable to connect to the database: Could not connect to MySQL'..
Im still new to joomla...Im using joomla 1.5.
My problem is,I only copy and backup my folder that i create in htdocs by the name 'topbit'..
I delete everything including xampp folder and reinstall xampp and joomla package..
I delete everything is because i lost my phpmyadmin password.So,i tought,if i delete it and reinstall it can be fine...
but at last,after reinstall,i copy and pasted back my 'topbit' folder in htdocs,i cant open my page even in localhost.It says 'Database Error: Unable to connect to the database: Could not connect to MySQL'..
Can anyone please help me...
I need somebodies help as soon as possible..
thanQ very much..

joeblogs
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu May 07, 2009 10:48 pm

Re: Database Error: Unable to connect to the database: Could not

Post by joeblogs » Thu May 07, 2009 10:57 pm

The issue for me seems that you can't have the £ symbol (that's the symbol over the number 3 on my keyboard) in your password. Now, that's what I call a real gotta! Must be something to do with the way the Joomla install program is handling/mishandling password parsing.

kafff
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Apr 23, 2009 6:55 pm

Re: Database Error: Unable to connect to the database: Could not

Post by kafff » Fri May 15, 2009 2:30 pm

My client messaged me last evening saying their site is not working. The error on the page is

Database Error: Unable to connect to the database:Could not connect to MySQL

I have no idea how to fix this............HELP!!!

ASHCA
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Apr 24, 2008 10:12 pm

Re: Database Error: Unable to connect to the database: Could not

Post by ASHCA » Sat May 23, 2009 12:10 pm

I have the same problem when manually installing Joomla on my Yahoo hosted account. When I get to the "Database Configuration" page I entered the following:
Database Type: mysql
Host Name: localhost
Username: STM-DB (the username I use to log in to my "phpMyAdmin" account)
Password: xxxxxxx (the password I use to log in to my "phpMyAdmin" account)
Database Name: stmj (the database I created in "phpMyAdmin" account)

When I click "Next" I get an error message "Unable to connect to the database." What am I doing wrong? Thanks.

roryam
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Apr 21, 2009 6:37 am

Re: Database Error: Unable to connect to the database: Could not

Post by roryam » Wed Jun 03, 2009 4:54 am

I'm trying to move my joomla1.5.9 site from a local server to a live web server and am getting this same message: Database Error: Unable to connect to the database:Could not connect to MySQL

I think I've tried just about everything in this thread to fix it, but no luck.

PLEASE someone help. I'll provide my configuration.php settings if someone will look at them. It'd be greatly appreciated as I've put a lot of time into this site and this is getting very frustrating.

Thanks.

User avatar
keefrichards
Joomla! Explorer
Joomla! Explorer
Posts: 366
Joined: Tue Aug 12, 2008 9:04 am
Location: Sydney, Australia

Re: Database Error: Unable to connect to the database: Could not

Post by keefrichards » Wed Jun 03, 2009 5:29 am

Have you established the databases at/with your host service?
It's great to be here......in fact,.....it's great to be anywhere!

roryam
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Apr 21, 2009 6:37 am

Re: Database Error: Unable to connect to the database: Could not

Post by roryam » Wed Jun 03, 2009 5:55 am

I've created a new database (and user) and imported the local .sql file on my host account.

User avatar
keefrichards
Joomla! Explorer
Joomla! Explorer
Posts: 366
Joined: Tue Aug 12, 2008 9:04 am
Location: Sydney, Australia

Re: Database Error: Unable to connect to the database: Could not

Post by keefrichards » Wed Jun 03, 2009 7:39 am

Can you get anything at all?
for instance, can you navigate to :

http://www.yoursite.com/administrator
or
http://www.yoursite.com/index
or
http://www.yoursite.com/index.htm

Is there anything at all on the server like htaccess files?

What is the site's address?
It's great to be here......in fact,.....it's great to be anywhere!

roryam
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Apr 21, 2009 6:37 am

Re: Database Error: Unable to connect to the database: Could not

Post by roryam » Wed Jun 03, 2009 5:20 pm

http://www.rorymoulton.com

I get the db error with /administrator
I get a 404 error with /index
With /index.html, I get the test page that my host put up when we tried to work through the problem yesterday. (they weren't much help)

Yes, I have an htaccess file on my server.

What the hell have I done? I didn't fill out the confiugration.php correctly, right?

Thanks for the help!

User avatar
keefrichards
Joomla! Explorer
Joomla! Explorer
Posts: 366
Joined: Tue Aug 12, 2008 9:04 am
Location: Sydney, Australia

Re: Database Error: Unable to connect to the database: Could not

Post by keefrichards » Wed Jun 03, 2009 6:57 pm

First thing to do would be to try and install a joomla!, any joomla, (but not the one you've just built) onto the remote server. Just to see that the server is handling Joomla! properly. Do a fresh joomla install.

If that doesn't work, then it's a problem with your host.

If it does work, overwrite the insalled files with your new rebuilt files.

Good luck,
Have to catch a plane
:eek:
It's great to be here......in fact,.....it's great to be anywhere!

kovomo
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Mar 10, 2009 5:07 am

Re: Database Error: Unable to connect to the database: Could not

Post by kovomo » Mon Jun 08, 2009 8:26 pm

I was locked out of my admin panel for my website, so I found a solution:
Directions
1. Use a MySQL utility such as phpMyAdmin or MySQL Query Browser .
2. Open the correct database and select the table, jos_users . (Change default table prefix, 'jos_' to your table prefix if it is different.)
3. Select the record (or table row) for your administrator account. (The default Super Administrator is user number 62.)
4. Copy and paste a known MD5 hash into the password field. You can use one of the below examples. Warning: You must paste the password's hash value, not the password itself. You can use any of the following hashs, or create your own using one of the MD5 tools listed below.
password = "MD5 hash of password"
------------------------------------------------------
admin = 21232f297a57a5a743894a0e4a801fc3
secret = 5ebe2294ecd0e0f08eab7690d2a6ee69
OU812 = 7441de5382cf4fecbaa9a8c538e76783
5. Save the user record.
6. Point a browser to your site and log in using the Super Administrator account you just modified.
7. IMPORTANT: Once logged in, use the Joomla interface to change the password to one that only you know. This step is vital as it will 'salt' your new password, thus adding an additional level of security on top of the MD5 hash.
Note: This technique can be used to modify any other accounts password. You can also use it to change Usernames.
I followed the directions and was able to change my super admin password information, but when point my browser to my website to access my admin panel, I get an error:
Database Error: Unable to connect to the database:Could not connect to MySQL
I looked at the configure.php-dist file on the root folder of my server through Godaddy. It looks like this:
<?php
/**
* @version $Id: configuration.php-dist 9991 2008-02-05 22:13:22Z ircmaxell $
* @package Joomla
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software and parts of it may contain or be derived from the
* GNU General Public License or other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* -------------------------------------------------------------------------
* THIS SHOULD ONLY BE USED AS A LAST RESORT WHEN THE WEB INSTALLER FAILS
*
* If you are installing Joomla! manually i.e. not using the web browser installer
* then rename this file to configuration.php e.g.
*
* UNIX -> mv configuration.php-dist configuration.php
* Windows -> rename configuration.php-dist configuration.php
*
* Now edit this file and configure the parameters for your site and
* database.
*/
class JConfig {
/**
* -------------------------------------------------------------------------
* Site configuration section
* -------------------------------------------------------------------------
*/
/* Site Settings */
var $offline = '0';
var $offline_message = 'This site is down for maintenance.<br /> Please check back again soon.';
var $sitename = 'Joomla!'; // Name of Joomla site
var $editor = 'tinymce';
var $list_limit = '20';
var $legacy = '0';

/**
* -------------------------------------------------------------------------
* Database configuration section
* -------------------------------------------------------------------------
*/
/* Database Settings */
var $dbtype = 'mysql'; // Normally mysql
var $host = 'localhost'; // This is normally set to localhost
var $user = ''; // MySQL username
var $password = ''; // MySQL password
var $db = ''; // MySQL database name
var $dbprefix = 'jos_'; // Do not change unless you need to!

/* Server Settings */
var $secret = 'FBVtggIk5lAzEU9H'; //Change this to something more secure
var $gzip = '0';
var $error_reporting = '-1';
var $helpurl = 'http://help.joomla.org';
var $xmlrpc_server = '1';
var $ftp_host = '';
var $ftp_port = '';
var $ftp_user = '';
var $ftp_pass = '';
var $ftp_root = '';
var $ftp_enable = '';
var $tmp_path = '/tmp';
var $log_path = '/var/logs';
var $offset = '0';
var $live_site = ''; // Optional, Full url to Joomla install.

/* Session settings */
var $lifetime = '15'; // Session time
var $session_handler = 'database';

/* Mail Settings */
var $mailer = 'mail';
var $mailfrom = '';
var $fromname = '';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '0';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'localhost';

/* Cache Settings */
var $caching = '0';
var $cachetime = '15';
var $cache_handler = 'file';

/* Debug Settings */
var $debug = '0';
var $debug_db = '0';
var $debug_lang = '0';

/* Meta Settings */
var $MetaDesc = 'Joomla! - the dynamic portal engine and content management system';
var $MetaKeys = 'joomla, Joomla';
var $MetaTitle = '1';
var $MetaAuthor = '1';

/* SEO Settings */
var $sef = '0';
var $sef_rewrite = '0';
var $sef_suffix = '';

/* Feed Settings */
var $feed_limit = 10;
}
?>
I tried to fill in the var $user = '';var $password = '';var $db = ''; variables with my specific database information, but nothing happens. I read a few forums that suggested that but I'm confused to what information I'm adding. Also, I had to change my password for accessing my database before I made the change. I just need to know where I can find the files I need in order to change them to match my new password changes.

My website is peppersoup.info

User avatar
GODADDY
Joomla! Explorer
Joomla! Explorer
Posts: 382
Joined: Fri Sep 07, 2007 7:28 pm
Location: Arizona
Contact:

Re: Database Error: Unable to connect to the database: Could not

Post by GODADDY » Mon Jun 08, 2009 10:44 pm

kovomo,

Locate the configuration.php file and make sure you updated your database password here.


Locked

Return to “Administration 1.5”