Joomla 2.5

Joomla 2.5.1 Installation Error – Could not connect to the database. Connector returned number:2

This is my first time manually installing the new Joomla 2.5.1, I’ve installed Joomla 2.5.1 a couple times already on Bluehost with the SimpleScripts.  The only problem with Bluehost installation is that it doesn’t install the Sample Data even though I selected it to install it for me.  Anyways, so I chose to manually install on Dreamhost instead.   I encountered an error below but quickly was able to resolve it and get Joomla 2.5.1 installed on my website.

Dreamhost Joomla 2.5 Database Connection Error
Dreamhost Joomla 2.5 Database Connection Error

When I got to Step 4 – Database, I entered the information and clicked ‘Next’ but got this error message:

Could not connect to the database.  Connector returned number : 2

This was a relatively easy fix.  Basically Joomla is saying that it could not find the MySQL database you created in Dreamhost.  So you should check your database details, or change the db user password if required.    This is assuming:

a:  You have a MySQL Database created

b.  You have a Database user created

High level Overview of how to fix

  • Check your Hostname in Dreamhost
  • Check MySQL Database Name, db User and db Password in Dreamhost
  • Enter Database Information in Joomla 2.5 Installation
Dreamhost - Check Hostname
Dreamhost - Check Hostname

1.  Check your Hostname in Dreamhost

  • Login to your Dreamhost Webhosting account
  • Click on ‘My SQL Databases’
  • Scroll down to see your ‘Hostname’.
  • For example:  My hostname = sql.cmsmind-joomla.com
Dreamhost Database Name and Database User
Dreamhost Database Name and Database User

2.  Check MySQL Database Name, db User and db Password

  • Scroll down and see ‘Databases’ and click on your database user
  • For example:
      • My database name  = c_db1
      • My db User = cu1
  • In the window ‘My SQL Databases’, scroll down to the bottom where you see “Would you like to change cu1’s password?”
  • Enter in a new password and enter it in again
  • For example:
      • My new password = cmsmind
  • Click on ‘Modify cu1 now!’

3.  Enter Db Information in Joomla 2.5 installation

It takes Dreamhost about 10 minutes to change the password, so if you try again right away with the new information, it will not work.  So enter in the new database information in again after about 10 mins.

  • Resume your Joomla 2.5 Installation screen
  • Proceed to Step 4 – Database Configuration – Connection Settings
  • In the Basic Settings, set the following values that you entered above in Step 1 & 2
  • For example:
      • Database Type = Mysqli
      • Host Name = sql.cmsmind-joomla.com     (from step 1)
      • Username = cu1                       (from step 2)
      • Password = cmsmind            (from step 2)
      • Database Name = c_db1        (from step 2)
  • Click on ‘Next’
Joomla 2.5 Database Connection Screen
Joomla 2.5 Database Connection Screen
A side note, please use your own database information and hostname information.  The database information and hostname I showed in my examples are for this tutorial purpose only.  You will not be able to connect to my database with the information above.
Hope that helps,
  1. Isaac Dung

    I encountered the same error and these useful tips by Elaine helped me all the way.
    Really helpful article Elaine. I will surely follow cmsminds.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha Captcha Reload