Cannot connect to database

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

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
ryandgreat
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Sep 22, 2012 10:24 am

Cannot connect to database

Post by ryandgreat » Sat Sep 22, 2012 10:34 am

I'm on the database configuration part of the installation, I've already filled up the necessary fields, but when I clicked next, this is what I get:

"Could not connect to the database. Connector returned number: Unable to connect to the Database: Could not connect to MySQL."

I'm using WAMP. Is there an issue with this? Do I need to use XAMPP? Need help please...
Last edited by humvee on Sun Sep 23, 2012 8:47 pm, edited 1 time in total.
Reason: Marked as resolved

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30931
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Cannot connect to database

Post by Per Yngve Berg » Sat Sep 22, 2012 12:01 pm

Mod. Note: Split post into it's own topic. Please ask your question making a new topic. Do not highjack someone else's.

You have entered the wrong username and password for the database. Use the one your created when creating the database. Phpmyadmin is included with WAMP, which you can use to administrate the database. Create a new database user that can be used by Joomla and give it permission to the database. The default user is "root" with no password.

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: Cannot connect to database

Post by humvee » Sat Sep 22, 2012 12:05 pm

By WAMP I am assuming you mean WampServer 2.
If so in the TaskBar does the WampServer icon show as Green meaning all services have started or Orange? Try restarting the WampServer components from the menu.
If this is green, then it would appear you are not entering the correct details for the database connection. (Assuming you have not altered the Wamp security settings after installation in any way)
type = mysqli
host = localhost
user = root
password = (blank, nothing, nada, empty field)
database name = (whatever you want it to be)
database table prefix = (the default random value provided by the installation or your own choice. This always ends with an underscore e.g. prefix_).

For database name and table prefix, only use letters, numbers, hyphen, and underscore. Never use spaces or special characters.
Remember that all Unix based systems/programs (which includes Apache/MySQL/PHP et al) require case sensitivity to be adhered to so, HELP is different to help is different to HelP)

ryandgreat
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Sep 22, 2012 10:24 am

Re: Cannot connect to database

Post by ryandgreat » Sun Sep 23, 2012 1:12 am

@ Per Yngve Berg
- Thanks for the info, and I'm sorry if I highjacked someone else's..

@ humvee
- yep, sorry if I shortened it.. In wampserver2, I'm using www folder in creating php or html pages, is that the same as htdocs for XAMPP?

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: Cannot connect to database

Post by humvee » Sun Sep 23, 2012 8:56 am

Yes www = htdocs = countless other descriptions/titles used by different people/hosts

You should be installing Joomla into www/joomla_site/ not directly into www/ which contains WampServer's own "site" pages.

Don't worry about the shortening I just wanted to make sure this was not simply a case where you were installing Apache MySQL and PHP on Windows yourself (which is where WAMP as a term originates) ;)

Have you now succeeded in the installation?

ryandgreat
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Sep 22, 2012 10:24 am

Re: Cannot connect to database

Post by ryandgreat » Sun Sep 23, 2012 3:24 pm

@humvee
- just got home and yeah, got it! installation successful, thanks for the help mate.. by the way, I'm new on this, I'm still on the learning process and I want to master this like you do.. any tips that you can share?

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: Cannot connect to database

Post by humvee » Sun Sep 23, 2012 8:45 pm

Yep, Do backups. Spend more than seven years working with Joomla and helping out on the forums ;) and you never stop learning! Do backups. Practice everything, if it breaks just try it again, keep notes. Do backups. Use the search facility, use google, read the documentation. Do backups. Practice locally before spending money on a remote host. Do backups. Keep the site updated at all times.

Oh and DO BACKUPS ;)

ryandgreat
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Sep 22, 2012 10:24 am

Re: Cannot connect to database

Post by ryandgreat » Mon Sep 24, 2012 3:00 pm

ahaha, do backups, got it.. thanks mate.. :D


Locked

Return to “Installation Joomla! 2.5”