Could not connect to the database. Connector returned number

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.
User avatar
2ninerniner2
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3231
Joined: Sun May 25, 2008 8:05 am
Location: Calgary, Alberta, Canada
Contact:

Could not connect to the database. Connector returned number

Post by 2ninerniner2 » Wed Jan 12, 2011 12:39 am

Howdy,

J!1.6 Stable/Win 7 Home Premium/Local

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

This is as far as I can get with my trusty XAMPP 1.7.3 within which I have successfully installed and run literally hundreds of J! (among others) sites, including J!1.6RC1.

Tried creating the database first (didn't have to with J!1.6RC1), used 127.0.0.1 instead of localhost, tried MySQL instead of MySQLi (default choice). All the connection items are as they should be. Tried another install of J!1.6RC1 and it went just fine; no issues. Any ideas? :)

Cheers!
Lyle
@snifflevalve

pfphosts
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Mar 17, 2010 8:44 am

Re: Could not connect to the database. Connector returned nu

Post by pfphosts » Wed Jan 12, 2011 3:39 am

Im also facing the same problem. I have put it the right host (localhost), username and password and MySQL but no matter how I try- it still wont connect.

infact when I access the site with the domain url ie www.domain.com or www.domain.com/installation, I get the message:

This website is temporarily unavailable, please try again later.

but when I use the IP address alternative, it does take me through the installation till I get to the database section where it says it cannot connect

The permissions are all set correctly. Infact Iv installed and configured almost 400 joomla sites before- just that this is my first 1.6 installation unless if there is a different way of doing it.

User avatar
free-rebel
I've been banned!
Posts: 602
Joined: Sun Dec 19, 2010 1:26 am
Location: Slovakia, Bratislava

Re: Could not connect to the database. Connector returned nu

Post by free-rebel » Wed Jan 12, 2011 3:45 am

I m using wampserver, there was not errors, so probably will be problem somewhere in setting in xampp :pop search where :d
I m Rebel ...

mikel011
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jan 12, 2011 5:02 pm

Re: Could not connect to the database. Connector returned nu

Post by mikel011 » Wed Jan 12, 2011 5:10 pm

Try remove your "root" password and click next

andrzej61
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Feb 07, 2009 6:48 pm

Re: Could not connect to the database. Connector returned nu

Post by andrzej61 » Wed Jan 12, 2011 7:15 pm

:) The problem does not seem to be a matter of XAMP. I have the same on a normal server, where i have installed Joomla's many times. No connection with base. I cannot understand it. There must be some new conditions for the database to connect now in Joomla 1.6. I do not believe that I have made any trivial mistake as I have installed Joomla hudreds of times before. Please help anyone who knows what's the matter.

pfphosts
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Mar 17, 2010 8:44 am

Re: Could not connect to the database. Connector returned nu

Post by pfphosts » Wed Jan 12, 2011 11:16 pm

The problem does not seem to be a matter of XAMP. I have the same on a normal server, where i have installed Joomla's many times. No connection with base. I cannot understand it. There must be some new conditions for the database to connect now in Joomla 1.6. I do not believe that I have made any trivial mistake as I have installed Joomla hudreds of times before. Please help anyone who knows what's the matter.
Same here. Its not about root user or XAMP. Im doing this on a live site and have normal non-root username setup and still same "could not connect error"

User avatar
2ninerniner2
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3231
Joined: Sun May 25, 2008 8:05 am
Location: Calgary, Alberta, Canada
Contact:

Re: Could not connect to the database. Connector returned nu

Post by 2ninerniner2 » Wed Jan 12, 2011 11:46 pm

Further testing revealed:

1) Hostgator shared Linux account - connection error. I have successfully installed J! 1.6 RC1 on this account using the "normal" (for this account) database connection method; same method generates connection error with J! 1.6 Stable. Numerous J! 1.5.xx, WordPress 3.x.x, Drupal 6.x. and 7.0 successfully install.

2) GoDaddy shared Linux account - no connection error; J! 1.6 Stable installed with no errors.

3) XAMPP 1.7.3 - connection error when using "root" as the database password as is normal for this XAMPP installation and which also worked successfully with J! 1.6 RC1. However, when leaving the password empty (blank) as suggested in a post above, the install successfully completed. This is 180 degrees from what should work. This XAMPP installation has literally hundreds of Joomla, WordPress and Drupal installations, including J! 1.6 RC1 which ALL REQUIRED the "root" password.

I have not yet tried The Uniform Server nor WAMPServer but there is something definitely NOT the same from J! 1.6 RC1 to the 1.6 Stable.
@snifflevalve

andrzej61
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Feb 07, 2009 6:48 pm

Re: Could not connect to the database. Connector returned nu

Post by andrzej61 » Thu Jan 13, 2011 6:14 pm

:( I am sure there must be a real problem with the base. I had problems both with Joomla 1.6 RC1 and Stable. And I remember the first Joomla. 1.5.0 . It was full of bugs. Maybe up to some 1.5.8 - 1.5.9 there were some issues. Now Joomla 1.5 is excellent and super stable.
And as I managed to try J1.6 demo, the new Joomla 1.6 will be excellent. Multilevel article categories and user groups and rights. This was, up till now, obtainable with the use of some extra extensions, but when it is "native" now, it will be very stable.
I think we must wait for some J1.6.6 to be able to think to use it on a "live" site.

jthompsonbfl
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jan 18, 2011 2:53 pm

Re: Could not connect to the database. Connector returned nu

Post by jthompsonbfl » Tue Jan 18, 2011 2:58 pm

I'm still having this problem.

Any fixes, I've tried the following:

create a database through the host, tried using "host" as username, tried leaving password blank, i've tried changing "localhost" to 127.0.0.1, tried mySQLi, and mySQL,

Joomla 1.5.2 installed fine.


Any other ideas?

jthompsonbfl
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jan 18, 2011 2:53 pm

Re: Could not connect to the database. Connector returned nu

Post by jthompsonbfl » Tue Jan 18, 2011 4:57 pm

Since 1.5.2 installs fine, going to try to install it again and install the plugin that helps upgrade to 1.6 and see if that works.

I'll let you know what I find out.

jthompsonbfl
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jan 18, 2011 2:53 pm

Re: Could not connect to the database. Connector returned nu

Post by jthompsonbfl » Tue Jan 18, 2011 5:30 pm

I used jUpgrade and that seem to fix all the problems.

arodas
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Jan 21, 2011 9:56 pm

Re: Could not connect to the database. Connector returned nu

Post by arodas » Fri Jan 21, 2011 10:01 pm

2ninerniner2 wrote:Howdy,

J!1.6 Stable/Win 7 Home Premium/Local

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

This is as far as I can get with my trusty XAMPP 1.7.3 within which I have successfully installed and run literally hundreds of J! (among others) sites, including J!1.6RC1.

Tried creating the database first (didn't have to with J!1.6RC1), used 127.0.0.1 instead of localhost, tried MySQL instead of MySQLi (default choice). All the connection items are as they should be. Tried another install of J!1.6RC1 and it went just fine; no issues. Any ideas? :)

Cheers!
Lyle
I had the same problem with WAMP Server 2.1 and J! 1.6 Stable. What worked for me was, in step 4, using "joomla" as the DB name, "root" as the username, and no password.

markjonesmel
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Apr 02, 2009 11:40 pm

Re: Could not connect to the database. Connector returned nu

Post by markjonesmel » Sat Jan 22, 2011 11:15 pm

I was getting the same error installed on cPanel\WHM host.

It seems that the installer was defaulting to "MySQLi" and when I changed the database type to "MySQL" (in the dropdown) then the installer carried on fine. All installed perfect.

Can someone else with this problem confirm this was their issue too.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Could not connect to the database. Connector returned nu

Post by leolam » Sun Jan 23, 2011 7:48 am

markjonesmel wrote:I was getting the same error installed on cPanel\WHM host.
It seems that the installer was defaulting to "MySQLi" and when I changed the database type to "MySQL" (in the dropdown) then the installer carried on fine. All installed perfect.
Can someone else with this problem confirm this was their issue too.
This is webhost depending. If MySQLli is compiled it works as such..if not than you need to use mySQL. MySQLi stands for MySQL Improved. Any descent host should support that (we do) http://en.wikipedia.org/wiki/MySQLi for more info

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

andrzej61
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Feb 07, 2009 6:48 pm

Re: Could not connect to the database. Connector returned nu

Post by andrzej61 » Mon Jan 24, 2011 5:08 pm

I think it is not a matter of Mysqli or Mysql. I tried many times both and still no connection. I think that Mysqli or Msql is not a problem at all.

grabusik
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Apr 16, 2010 9:58 am

Re: Could not connect to the database. Connector returned nu

Post by grabusik » Sun Jan 30, 2011 3:42 pm

Try to set the password for the database without any special characters.

I had the problem with connecting to the database. I've noticed that after getting error, password was cutted to only 5 characteres (which were letters). SO i've changed the password in database and it works.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Could not connect to the database. Connector returned nu

Post by leolam » Sun Jan 30, 2011 4:33 pm

andrzej61 wrote:I think it is not a matter of Mysqli or Mysql. I tried many times both and still no connection. I think that Mysqli or Msql is not a problem at all.
That depends on your host/server installation. If your host does not support MySQLli it won't run

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

Franky_R
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Feb 02, 2011 11:18 am

Re: Could not connect to the database. Connector returned nu

Post by Franky_R » Wed Feb 02, 2011 11:20 am

I have the same problem with one.com hosting ... Unable to connect to the Database: Could not connect to MySQL.

Settings are correct.

Any thoughts ?

CPUHelp
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Feb 03, 2011 11:43 pm

Re: Could not connect to the database. Connector returned nu

Post by CPUHelp » Thu Feb 03, 2011 11:47 pm

I had the same problem too. I was able to resolve it by entering root with no password and the installation proceeded. I hope this is helpful.

User avatar
RenewGuru
Joomla! Intern
Joomla! Intern
Posts: 76
Joined: Thu Mar 11, 2010 1:34 am

Re: Could not connect to the database. Connector returned nu

Post by RenewGuru » Wed Mar 02, 2011 3:37 pm

Using a Windows 7 64bit machine with WAMPSERVER 2.1e and receiving the exact same error message when attempting the Database Configuration in the J1.6 Stable installation! Doesn't Stable mean they actually tested this on exact if not similar IDE's prior to branding it with this status?!

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

User avatar
RenewGuru
Joomla! Intern
Joomla! Intern
Posts: 76
Joined: Thu Mar 11, 2010 1:34 am

Re: Could not connect to the database. Connector returned nu

Post by RenewGuru » Wed Mar 02, 2011 3:41 pm

CPUHelp wrote:I had the same problem too. I was able to resolve it by entering root with no password and the installation proceeded. I hope this is helpful.
Thanks CPUHelp that nailed it!

Wim vD
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Dec 13, 2006 11:00 am

Re: Could not connect to the database. Connector returned nu

Post by Wim vD » Tue Mar 15, 2011 11:20 am

The same issue to me. Although on most of my sites, 1.6.1 installed without any problems, on some hosts, it didn't and none of the options mentioned above worked.
I decided to let it rest for a while. Recently however, my host added a short instruction in their control panel for using a MySQL5+ database: "you need to switch from PHP 5.2 to PHP 5.3". Guess what: it solved the problem. :)
Now I'm not a PHP guru, but to me this at least raises some questions over PHP5.2 being the recommended PHP-version for Joomla 1.6.x....

Ayougoudou
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Mar 15, 2011 9:25 pm

Re: Could not connect to the database. Connector returned nu

Post by Ayougoudou » Tue Mar 15, 2011 9:55 pm

Hi!
I had the same issue in installing joomla 1.6 but I managed to solve it after following some advice from this forum.
You should be aware that not all host name is localhost; this is what worked for me:

- login to your cpanel account
- look for MySql Icon and click it
- read that page and you will find your host name there.
If you do not find it then contact your hosting company for the host name.

Note
Before you go for the above point, check the following:
-User name spelling
- sql password spelling(not the one you provided for cpanel login)
-database name spelling
- check if your host is using a prefix for the User name and the password.

I hope this is helpfull.

Good luck!!!!

rbc303
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Thu Feb 07, 2008 1:00 am

Re: Could not connect to the database. Connector returned nu

Post by rbc303 » Thu Apr 07, 2011 2:19 pm

had the same problem and just could not understand why, I had done at least 100 joomla installs! but it was my first time installing 1.6 so i blamed it on that.
so I went into my Lunarpages Cpanel and installed 1.6 this way instead of manual, and when I went to type in my preferred database name, it told me that it could not exceed 7 characters. Once I brought it down to 7 from 9 characters it installed perfectly!
Now I did not go back and try a manual install with the new shorter database name, but I think that was the problem.

itswadesh
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Apr 12, 2011 3:37 pm

Re: Could not connect to the database. Connector returned nu

Post by itswadesh » Tue Apr 12, 2011 3:52 pm

Hi,

your issue seems to be with the mysql database name (not with userid or password or even host name).

Hence create a new database. The list of commands are here http://itswadesh.wordpress.com/2011/04/ ... -commands/

If you have forgotten your database root password visit http://itswadesh.wordpress.com/2011/04/ ... -password/

patomckinney
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri May 20, 2011 4:50 pm

Re: Could not connect to the database. Connector returned nu

Post by patomckinney » Fri Aug 19, 2011 3:36 am

I am using godaddy shared linux hosting. I was getting this error. I put the ip address in for the database instead of db.xxxx.hostedresource.com. Also I I copy and pasted the addresses into to notepad first. Then it worked.

handy andy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 109
Joined: Fri Aug 06, 2010 1:56 pm

Re: Could not connect to the database. Connector returned nu

Post by handy andy » Tue Aug 23, 2011 1:35 pm

Hi,

I changed the option from Delete old database to Back Up and the installation went ok.

Not sure if backing the old database will cause problems later, suppose I'll cross that bridge when I come to it.

Regards,

Andy.

jorgon
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Aug 20, 2011 5:29 am

Re: Could not connect to the database. Connector returned nu

Post by jorgon » Sat Aug 27, 2011 7:26 am

I found that when trying to create a new database and new user for the database manually, using "MySQL databases" in control panel to add a new user did not take me to the privileges screen. Because of that my new user had no privileges and the database was not being found. However I started again using the "MySQL database wizard" instead. This did take me to the privilege screen and everything worked ok once I gave my new user privileges.

olivierdb
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jun 20, 2010 5:23 pm

Could not connect to the database. Connector returned number

Post by olivierdb » Sat Aug 27, 2011 7:56 pm

None of the above posts has helped me resolve the issue encountered.
I'm trying to install Joomla!1.7.0 on my iMac running Mac OS X Lion 10.7.1, Apache 2.2.19, PHP 5.3.6 and MySQL 5.5.15.

I created a web site in my Sites folder to host the Joomla install. I access the web site via http://localhost/~Olivier/sncg.

However, to access the database I use the command mysql -h localhost -uroot -p

I have no problem connecting to MySQL using the terminal or the SQL client Navicat. It's just the Joomla install which is failing!

nicmehr
I've been banned!
Posts: 36
Joined: Fri Feb 04, 2011 12:19 pm

Re: Could not connect to the database. Connector returned nu

Post by nicmehr » Sun Aug 28, 2011 11:44 am

i suggest use appserver its very completely
i use it and i dont have any problem


Locked

Return to “Installation Joomla! 2.5”