[SOLVED]Could not connect to database. Please check your c

This forum is for general questions about extensions for Joomla! version 1.5.x.

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.
marde
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri May 28, 2010 7:05 pm

[SOLVED]Could not connect to database. Please check your c

Postby marde » Wed Jul 21, 2010 12:33 am

I'm running kickstart and trying to restore my .jpa file from my xampp to a live host.
Everything seems OK in the DB Restore phase as follows:

Database type (usually "mysql"): mysql
Database server host name: localhost
User name: root
Password: ********
Database name: joomla18

These values agree precisely with what's listed in databases.ini in the installation\sql directory,
yet I keep getting the message, <b>Could not connect to database. Please check your connection parameters.</b>

Thanks very much to anyone for a clue to what's going on.
Last edited by marde on Thu Jul 22, 2010 11:54 am, edited 1 time in total.

aemiller
Joomla! Hero
Joomla! Hero
Posts: 2301
Joined: Sat Aug 29, 2009 3:08 am
Location: Akron PA
Contact:

Re: Could not connect to database. Please check your connect

Postby aemiller » Wed Jul 21, 2010 1:32 am

Don't feel bad, your frustration is one that many of us shared when trying to learn Joomla. >:(

When moving from a localhost to an online server, you need four specific settings for your configuration.php file to properly connect the database. They are

1) dbhost (this one can be tricky. Some webhosts locate the db somewhere other than where the joomla files are located. If nothing else, ask you isp tech.);

2) db name (this should be available in looking at phpMyAdmin, although there may be a prefix attached to it. Again, if necessary ask your isp tech);

3) db username (what username did you use when setting up the db? I don't think you will find this one with phpMyAdmin. Look under mySQL for DB privileges.)

4) db password (this one you need to know. Or reset if you cannot remember it.)

I hope that helps.

marde
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri May 28, 2010 7:05 pm

Re: Could not connect to database. Please check your connect

Postby marde » Wed Jul 21, 2010 11:34 am

Thanks very much, aemiller. I'll look into these things.
--marde

aemiller
Joomla! Hero
Joomla! Hero
Posts: 2301
Joined: Sat Aug 29, 2009 3:08 am
Location: Akron PA
Contact:

Re: Could not connect to database. Please check your connect

Postby aemiller » Wed Jul 21, 2010 1:15 pm

Let us know how it works out.

marde
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri May 28, 2010 7:05 pm

Re: Could not connect to database. Please check your connect

Postby marde » Wed Jul 21, 2010 2:43 pm

I thought the database is the one on the localhost not the online server.
In that case wouldn't the host name simply be localhost?
Also, the database name is joomla18. That's the name I gave.
The username was root. I remember doing this and I also gave the password at the time which is the same password I gave to the request in kickstart. In fact kickstart chose these names and a password and I rewrote the password.

aemiller
Joomla! Hero
Joomla! Hero
Posts: 2301
Joined: Sat Aug 29, 2009 3:08 am
Location: Akron PA
Contact:

Re: Could not connect to database. Please check your connect

Postby aemiller » Wed Jul 21, 2010 2:54 pm

If your site is online, then you also need an online dbase. If not, then when your computer is offline so is your site. You need to create an online dbase.

marde
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri May 28, 2010 7:05 pm

Re: Could not connect to database. Please check your connect

Postby marde » Wed Jul 21, 2010 3:35 pm

Yes, I can do that. I can create a database on the online site. I did it for drupal but then never used drupal because I found I preferred to work with Joomla, and anyway I had trouble making sense out of drupal. Then I discovered I could download xampp and work with Joomla on my own computer.

But the thing that made me think I didn't need to create a database for Joomla online is this paragraph from the akeeba-backup-guide:

"As you may have observed, we did not talk at all about using or installing Joomla!™ in the restoration process. In fact, we strongly discourage you from installing Joomla!™ prior to the restoration. The backup archive has everything you need: your database; your site's files (including the Joomla!™ CMS); and the PHP script to restore your database and re-configure your site - in case you moved to another server or subdomain. You can use the backup archives to perform bare metal restoration of your site. Even if the server which used to host you blows up and vanishes in a black smoky cloud, your entire site is safely stored in the backup archive."

But what you're saying is that I should set up a database or placeholder for one on my online site before I run kickstart? Then the database already created on my localhost will have a place to go?

aemiller
Joomla! Hero
Joomla! Hero
Posts: 2301
Joined: Sat Aug 29, 2009 3:08 am
Location: Akron PA
Contact:

Re: Could not connect to database. Please check your connect

Postby aemiller » Wed Jul 21, 2010 3:46 pm

Yes! :)

marde
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri May 28, 2010 7:05 pm

Re: Could not connect to database. Please check your connect

Postby marde » Thu Jul 22, 2010 12:13 am

I finally got it through my head that the site parameters are not for my localhost on my computer but for the online site! In addition, I found that for some reason I had missed a whole section in the akeeba-backup-guide describing this very thing. So, I did exactly what you and the guide said and created a new mysql database on the online site. This time kickstart worked and my new site is up, a perfect replication of my xampp site. :laugh:
Thanks very much for your patient guidance! ;D

aemiller
Joomla! Hero
Joomla! Hero
Posts: 2301
Joined: Sat Aug 29, 2009 3:08 am
Location: Akron PA
Contact:

Re: Could not connect to database. Please check your connect

Postby aemiller » Thu Jul 22, 2010 1:31 am

You're very welcome. I'm always glad to help. :D

Now that you have your question resolved, please go back to your original post. At the beginning of the subject line add the word [SOLVED!] and the green circle/checkmark icon.


Return to “Extensions for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 7 guests