Could not connect to the database.Connector returned number2

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.
tigitech
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Nov 07, 2006 5:08 pm

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

Post by tigitech » Wed Feb 29, 2012 2:41 am

If you are used to installing Joomla, you probably use blank for the password especially for localhost. With Joomla 2.5, you must enter a password or you will receive the above error. Good luck

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Wed Feb 29, 2012 8:10 am

tigitech wrote: With Joomla 2.5, you must enter a password or you will receive the above error. Good luck
This is definitely UNTRUE. Leave the password BLANK!!!!!

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Wed Feb 29, 2012 12:20 pm

jean_genie wrote:@mitchell - i didnt create a password and i tried with a password and followed your guide step by step, i have tried everything, its a local server, xamp, also tried installing older versions of xamps, as well as older versions of joomla, constantly same error message.

I have just noticed, i am not the only one using xamp, Chaz2000 is also using xamp. So i should just be using wamp then?

Ok, will try that, i used xamp on 1.7 and it was fine, i didnt reliase it was a one click install to 2.5, so i installed 2.5 manually, and then the problems came........
But you say "i didnt create a password and i tried with a password" This just doesn't make sense. If ou didn't create a password, how on earth can you "Try with a password?"
Thousands of people use Xampp, I do myself as well as Wamp.
Before writing my Guide I spent hours and hours collating all the problems that users were having installing Joomla on a localserver. I then very carefully set a grid showing where the least number of problems occurred. From that grid I worked out the workflow for the Guide.
When you say you followed the Guide "To the letter" I accepted that but it was not quite the case. You used Xampp and not Wamp. Why did I recommend Wamp as apposed to Zampp. This is from the Joomla Documentation:
Xampp1.PNG
This comment is from Apache Friends Forum relating to Xampp, post dated 20th January 2012:
The instructions on the Tools page could be worded better and appear to be very outdated and unmaintained.
So I thought this might confuse some users so recommended using Wamp which does not share these problems.
OK so Xampp offer an FTP server and Wamp doesn't but it is just a 5 minute job to install File Zilla Server (Not to be confused with the more usual FileZilla client that most users are familiar with.) Whilst it is better to use FTP to transfer files it is not necessary when extracting from the Joomla ZIP file direct to the Wamp www folder.

The Guide has been tried and tested very carefully and in most the cases where a problem has occurred it has invariably been a user error.

That's the history of the Guide. Whether you use it or not is up to you but please don't say "you followed the Guide To the letter" when you start off using a different software and use a Password that you somehow haven't created.

My advice now is to properly uninstall Xampp and start from scratch with a new download of Joomla 2.5.1 and Wamp. Make sure you download the right version either 32 or 64 bit.
Would appreciate hearing what you decide and how you get on!

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Wed Feb 29, 2012 12:23 pm

jean_genie wrote:@mitchell - i didnt create a password and i tried with a password and followed your guide step by step, i have tried everything, its a local server, xamp, also tried installing older versions of xamps, as well as older versions of joomla, constantly same error message.

I have just noticed, i am not the only one using xamp, Chaz2000 is also using xamp. So i should just be using wamp then?

Ok, will try that, i used xamp on 1.7 and it was fine, i didnt reliase it was a one click install to 2.5, so i installed 2.5 manually, and then the problems came........
But you say "i didnt create a password and i tried with a password" This just doesn't make sense. If ou didn't create a password, how on earth can you "Try with a password?"
Thousands of people use Xampp, I do myself as well as Wamp.
Before writing my Guide I spent hours and hours collating all the problems that users were having installing Joomla on a localserver. I then very carefully set a grid showing where the least number of problems occurred. From that grid I worked out the workflow for the Guide.
When you say you followed the Guide "To the letter" I accepted that but it was not quite the case. You used Xampp and not Wamp. Why did I recommend Wamp as apposed to Zampp. This is from the Joomla Documentation:
Xampp1.PNG
This comment is from Apache Friends Forum relating to Xampp, post dated 20th January 2012:
The instructions on the Tools page could be worded better and appear to be very outdated and unmaintained.
So I thought this might confuse some users so recommended using Wamp which does not share these problems.
OK so Xampp offer an FTP server and Wamp doesn't but it is just a 5 minute job to install File Zilla Server (Not to be confused with the more usual FileZilla client that most users are familiar with.) Whilst it is better to use FTP to transfer files it is not necessary when extracting from the Joomla ZIP file direct to the Wamp www folder.

The Guide has been tried and tested very carefully and in most the cases where a problem has occurred it has invariably been a user error.

That's the history of the Guide. Whether you use it or not is up to you but please don't say "you followed the Guide To the letter" when you start off using a different software and use a Password that you somehow haven't created.

My advice now is to properly uninstall Xampp and start from scratch with a new download of Joomla 2.5.1 and Wamp. Make sure you download the right version either 32 or 64 bit.
Would appreciate hearing what you decide and how you get on!
You do not have the required permissions to view the files attached to this post.

shlyw
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 01, 2012 9:40 am

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

Post by shlyw » Thu Mar 01, 2012 10:36 am

Hi mitchell65,

Thought I'd say thanks for the pdf instructions. I was having the hardest time trying to figure out what i was doing wrong.

Don't understand y the joomla.org instructions for absolute beginners tells u to choose n enter a password when it's unnecessary.

wasted an entire day for me.

Now it tells me that my backend page is not found, but that is for another more energetic day.

Thanks again.

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Thu Mar 01, 2012 11:02 am

Hi shlyw
Thanks for that but are you still having trouble? Would have been better if you had started a new |Topic as you clearly do not have a problem that is returning " Could not connect to the database.Connector returned number 2" Give me a bit more detail as to if the install was successful and can you open the front page. What happens when you try to get into the backend login screen? When does it say that "backend page is not found"?

aplya_ray
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Mar 04, 2012 1:04 pm
Location: Japan!
Contact:

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

Post by aplya_ray » Sun Mar 04, 2012 1:14 pm

use 127.0.0.1 instead of localhost

or
make user who can access from any server like
GRANT ALL PRIVILEGES ON joomladb.* TO username IDENTIFIED BY 'pass';

and use your IP address for hostname.

shlyw
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 01, 2012 9:40 am

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

Post by shlyw » Mon Mar 05, 2012 3:58 am

yes, i should post my current issue on a more appropriate thread.

the reason i posted here was that my previous issue was "Could not connect to the database. Connector returned number2"

and my thanks are for the pdf that helped me get past that. ;D

I just figured out why localhost/test/administrator cannot be found after reading ur pdf from the beginning again.

That file doesn't exist on localhost! - i had followed half the XAMPP instructions and half of the pdf so my file was named something else entirely.

I am so embarrassed :-[ , but grateful i figured it out before i posted a cry for help...

Thank you for replying.

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Mon Mar 05, 2012 4:46 pm

Thanks for the feedback. No need for embarrassment, we have all done that at one time or another. Anyone who says they haven't are either telling porkies or they are the world's leading genius!!

jean_genie
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Feb 28, 2012 6:18 pm

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

Post by jean_genie » Mon Mar 05, 2012 10:20 pm

@Mitchell,

I have added wamp servier and uninstalled the xampp. now the problem is that the wamp server will not turn to green as it says in your guide from orange, real pain.

Just to clarify earlier posts on xampp, whilst using the xampp server, i tried installing once with a password and once without and trid many variations of all the details incluing adding changing the database details from calling it joomla16 to many other names that i could think of without the word joomla.

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Tue Mar 06, 2012 2:21 am

Just in case this helps someone else, I too had the problem at step 4 (Connector returned number 2).

I had followed everything correctly (yes, WAMP not XAMPP, latest versions of WAMP and Joomla, on localhost), my problems seemed to stem from another tutorial I had followed detailing the installation of Wampsever2, it said the first thing to do after its installation was to secure things by password protecting 'root' on both localhost and 127.0.0.1 (PhPMyadmin warned of this too), which I did, (NB there was another 'root' there listed as "::1" - don't know what that's about?)

This seemed to be my actual problem in getting the Guide1.pdf to work. I removed the root passwords (NB editing the passwords needs a slight manual adjustment to the 'config.inc.php' file in WAMP when setting and unsetting). Once I got things back to no passwords for 'root', the tutorial worked as described. No password for the j2.5 step 4 install was needed or tried- I don't know if the password I created for the PhPMyAdmin root security would have worked here? I didn't try.

Next thing to wonder is to reinstate the root security? No mention of security passwords in the Guide1.pdf. Maybe it's not needed on a localhost that will never see the light of day on the actual Internet?

danman54
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Sep 27, 2011 3:09 am

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

Post by danman54 » Tue Mar 06, 2012 6:05 am

Hey everyone just thought i share what worked for me.

I just installed Joomla 2.5 on a new Data Base and was getting that "Could not connect to the database. Connector returned number: 2" error.

After reading most of the posts in this thread i figured my problem was i was giving the wrong Data Base information . I was.

In all the excitement of installation i was typing the correct info except for the users name . i named the user "USER" back in cPanel when creating the new DB but it ads a prefix to the username and its the name of the site so my username was not just USER but mysite_USER . I was so anxious to install i was just typing in USER and not mysite_USER. did the change and it worked.

Hope this helps someone. ;)

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Tue Mar 06, 2012 8:22 am

mrartist wrote:
Next thing to wonder is to reinstate the root security? No mention of security passwords in the Guide1.pdf. Maybe it's not needed on a localhost that will never see the light of day on the actual Internet?
Correct. Though I always stop the local sever running when not in use. Easy to just left click the icon and click "Start all Services" when you want it on again.
Glad you found the Guide useful!

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Tue Mar 06, 2012 9:32 am

mitchell65 wrote:
mrartist wrote:
Next thing to wonder is to reinstate the root security? No mention of security passwords in the Guide1.pdf. Maybe it's not needed on a localhost that will never see the light of day on the actual Internet?
Correct. Though I always stop the local sever running when not in use...
I wonder if there's any risk in not having the root security not enabled, i.e. why stop the local server?

I'm on a home network behind a NAT firewall/router, my family/kids share the network and although we run internet security software on each machine (Mac, Win or possibly Lin), is there any risk in leaving the WAMP local server 'on' during the long hours while I'm figuring out my website(s) and being interrupted by kids or whatever else makes me forget to disable it?

If I were to reinstate those root passwords under 'Privileges' in phpMyAdmin now, would I run into any problems later other than if installing another J2.5 local site? Maybe if I do set a password, that's what I would type into the 'password' box of step 4, thus avoiding the 'Connector 2' error?

Many thanks for your guidance. Now to find guides/help for K2, K2Store, install Akeeba, JCE, NoNumber, etc, etc, etc...

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Tue Mar 06, 2012 9:59 am

I wonder if someone more in tune with security than me would join in here. My opinion is only built on personal experience over a number of years. i have never made a particular study of this aspect. Perhaps if you raise aseperate thread and get "Security" into the heading it might draw the right person in.
I can certainly help with Akeeba and JCE, I use them both extensively!
Raise seperate threads and I will watch out for them!

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Tue Mar 06, 2012 2:14 pm

Thanks for your offer of further help. Two years ago I built my first Joomla 1.5 site for an associate, I got it all working with Virtuemart, CB and a few other things. It looks impressive to me even now. Back then I found out all about the benefits of Akeeba and JCE, I also recommend the NoNumber extensions which are brilliant for the extra features and adding things where you didn't think possible and easily at that.

Back then I originally gave up on localhost development as it became too complicated working on a site that was also live and receiving registrations and content, so I just worked on the site live (at nights) where it still sits today humming away to itself.

It all took a lot of mental brain effort back then but I got there in the end after many sleepless nights. Two years later and I'm just about recovered enough to be contemplating reviving my own dead websites and seeing how far things have progressed with J2.5. I intend to try out K2 and the K2Shop unless someone tells me not to bother.

I think I'll take your advice and start off with some new questions I have on the Forum.

Many thanks

glambrecht
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Fri Jul 21, 2006 9:08 pm

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

Post by glambrecht » Wed Mar 07, 2012 8:18 pm

jeg har kæmpet i et par timer - og gjort alt, hvad I har beskrevet - uden resultat.
jeg har Gigahost
så skiftede hostnavn ud til mysql10.gigahost.dk
brugernavn og adgangskode som til kontrolpanelet hos gigahost
databasenavn: brugernavn_selvvalgt
(selvvalgt betyder, at jeg har skrevet halvdelen af domænenavnet, da jeg skal have flere databaser herinde)
håber, det kan hjælpe andre
-------------------------
best regards
Grethe
http://www.lambrecht.dk

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Wed Mar 07, 2012 8:43 pm

Google translation of the above:

I have struggled for a few hours - and done everything I have described - without result.
I have Gigahost
then changed hostname to the mysql10.gigahost.dk
username and password to the control panel at giga host
Database Name: brugernavn_selvvalgt
(self-selected means that I have written half of the domain name, because I must have multiple databases in here)
hope it can help others

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Sun Mar 11, 2012 2:35 pm

Just to confirm a few notes and issues I ended up having with the "Guide1.pdf" in the hope it might help clarify a few things for others:

1. When installing WAMP, it might be best, or it is easily possible to install it wherever you like. In fact some say it's probably best not on your main system drive. I installed mine to a smaller drive (80GB) I have in my system which might be better for all the small files that will eventually collect across the various intended local development sites.

2. The guide suggests to use the name "test" in the www directory. This may lead to confusion later in the phpMyAdmin/mySql interface where after installing wampserver2.2d, a default database of that name (test) exists as part of the initial install. The existence of this 'test' database is apparently not that important but if you delete it you will not be able to run some test at some point if needs be. Basically avoid creating a website called test to avoid confusion with the database of the same name later.

3. More confusion was found on the 'step 4: Database' instructions in the guide. It took me a while to realise what was going on. Basically avoid using the word 'root' in the "Database name" box. This box can be given any name you like and I would perhaps suggest use something useful pertaining to the site you are creating. Basically, the name you put in this box will, when clicking the Next button, automatically create a new blank database in that name. This is what your new site will use to store it's data. If like me you are planning on building or running several development sites or versions, you will be wanting those names to mean something meaningful. If you do several installs, like I did at first, with the word 'root' in there for all of them, I think you will be making all your sites use the same database and that is not good at all.

4. It's worth noting that the database creation happens automatically when using the installer locally (e.g. via WAMP or XAMPP, etc.), some instructions out there say you have to set a database up manually before installing Joomla but I have found this a waste of time. Database creation may not happen automatically when installing via your hosting company. If Section 4 gets stuck or after the Joomla install you don't see the database in the database section of phpMyAdmin, then you will need to create one manually before hand via that section on phpMyAdmin and then try another install of Joomla 2.5

5. As a note for the next box called "Table Prefix", this doesn't really matter what it is but it must end with an underscore character and the advice to the right of the box suggests keep it to three or four characters despite there being six by default (inc the underscore). My suggestion here is to either keep it as is or shorten it a bit. Again, if you are creating more than one website (via another Joomla install later) you can alter it slightly (the box seems to retain the last used settings when you do the next install), then later one day, when you are editing databases you'll not get confused as to which database you are in and neither will your software. You might also want to keep a note of this prefix for later reference perhaps when moving your development site to a live site and using something like Akeeba (I'm not sure yet, I haven't got that far!)

6. Regarding the Username and Password boxes on that Step 4 page. These are to do with the phpMyAdmin user permissions, nothing to do with Joomla except that by filling them in you are linking a database to Joomla and the username and password you give here are like the login for Joomla to link with phpMyAdmin. I found a useful video on [youtube] (http://youtu.be/Db7Hxx8mMGA, see from about 3:29, don't worry that it's for XAMPP, the phpMyAdmin part of WAMP is exactly the same software), basically it says you don't have to use the 'root' admin user and you can create your own username under the localhost Privileges section. I created a user using my more familiar username and password that I'll always remember and now all I do is enter those in the the Joomla installer Section 4 areas (along with my preferred database name as in point 3 above), then all will be installed just fine with the database all linked to me as the user and not some weird 'root' user that I might forget later.

7. You will see a red box after installing WAMP in phpMyAdmin that says something about the 'root' user not being password protected. I'm not sure how important this is to do on a local server that is just for testing and will never be used as a real server dishing out stuff onto the internet, but it can't harm to password protect the root user just in case something gets into your system that shouldn't. You basically have to set click on the 'Edit Privileges' nest to the 'root' users, I gave them one of my standard passwords and clicked okay. Almost as soon as you do that you will probably think something has gone wrong because you'll loose access to phpMyAdmin. This is simply because you have now password protected it and you are not allowed in any more. To fix this you need to edit a file called config.inc.php, it's in wamp\apps\phpmyadmin(yourversion) look for this:

Code: Select all

$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
At the end of the first line you will see what looks like " but these are actually two apostrophes. You need to put your new 'root' password in there. On the second line change true to false and save the file. You should now be able to access phpMyAdmin again. If not try clearing your browsers cache, that had me fooled for a short while!

You then should be good to go for working on your Joomla sites. Hope that helps someone. I don't guarantee these are all the right answers but I'm fairly positive I now have a good understanding of how this all works with Joomla 2.5.2 and wampserver 2.2d (March 11 2012) - What a shame there is so much old and misinformation out there, it takes time finding out these basic things that really should be in simple (& properly updated) 'how to' scenarios on the various software websites.

One last thing, for those wanting to open up use of the .htaccess file, see here:
http://www.minitek.gr/tutorials/joomla- ... -wamp.html

Good luck.

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Sun Mar 11, 2012 4:35 pm

mrartist
I am sorry you found the Guide confusing. You seem to have totally missed the point of the Guide. It was written for absolute newcomers in a language most people can understand. Of course some of the points you raise are true but incorporating any of it would just have moved the Guide into the realms of what is already out there talking in terms quite alien to most newcomers. Once you start talking about editing code 60% of the users who are attracted to the Guide will "switch off" they just find that too much. The Guide installs a Joomla instance with the Sample data included. This is just to give newcomers an idea of what a Joomla site is made up of. Had you bothered to read the Guide to the end you would have seen that there are more Guides to follow namely:
Guide2. Setting up a second Joomla site on your local server without the Sample Data so you can
start creating your own site.
That will be the place to introduce some of the more technical aspects. I have done a lot of research on this particular aspect Of Joomla and it is clear that only a small percentage of those whose start off having a look at what Joomla is all about finish up actually producing a website that is published on the internet!

This Guide together with the follow up Guides has been written mainly for a small Computer Club in South West Cornwall so to save any further confusion I have removed the link to the Guide in my signature and shall use it solely for the purpose for which it was originally intended. The only reason I put the link on the Signature was that as it had enjoyed a certain level of success locally I would offer it to a wider audience.
Can I look forward to see your more informative Guide shortly?

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Sun Mar 11, 2012 5:55 pm

I'm sorry you feel I've attacked your guide and that it's currently no longer available for those that find this thread. My apologies for not getting the 'tone' right, but you do make me wonder why I bothered to write my findings down.

Your guide was excellent and I did read it through to the end, and yes, I look forward to the next thrilling instalment. But I was doing the instalment of things now and I had problems with the guide because it left me wanting for a few vital pieces of advice that became a problem for me. So I researched the other maybe less informed guides out there and found the answers which I reported back here.

After all, I only said I found a couple of things in the guide were confusing and at the same time I explained a few other things for those that are still experiencing problems.

Ultimately, I read and followed your guide and as it was the best I found, I added to the information for others so it seems a shame to withdraw your guide and to say "Can I look forward to see your more informative Guide shortly?".

My points of confusion are valid:
  • a. It is not a good idea to call the site 'test' as, like me this made me think this was to do with the test database I saw in WAMP's list of databases.

    b. It is not a good idea to name the database root as this confuses/associates the name with the root user. Far better to call it something meaningful and associated with the site and certainly don't always use 'root' or the same name in that box if trying out two or more installations.
While I remember I found one other thing, the 'Database Type' box on step 4, apparently this can be left in the 'MySQLi' default state, it doesn't need changing to 'MySQL' - Or at least I have not yet found any problem with leaving it as so and one piece of advice I found suggested it's a more secure for of Database, but I will bow to anyone's advice that says otherwise.

The rest of my 'notes' as I called it at the very top of my post were just that and shouldn't have caused offence, more to explain to other beginners what it all means and how to get to grips with what's going on such as the warnings that phpMyAdmin gives about no passwords, all of which are pertinent to a beginner who feels something is not quite right. And lastly, if someone out there can't quite handle editing the odd bit of text in the odd text file that I pointed out exactly what it's called and where it is, then quite frankly, what are they doing installing a local server and trying to develop a website in Joomla. I'm afraid the going will get a lot tougher than that!

Regards and good luck.

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Sun Mar 11, 2012 6:30 pm

And lastly, if someone out there can't quite handle editing the odd bit of text in the odd text file that I pointed out exactly what it's called and where it is, then quite frankly, what are they doing installing a local server
I have been running a voluntary community project to introduce basic computing to more mature people for a number of years and I can assure you that the one thing that would put most of them off is trying to introduce them to what we might regard as very simple code editing at too early a stage in the learning process. It's like trying to run before you can walk. Everything is easy when you know how but impossibly difficult when you don't understand! It can also be very intimidating to some people. Years ago I worked with the University of Plymouth School of Computer Science and a brilliant lady working in the voluntary sector in Buckfastleigh in Devon and together we developed a system of teaching called "IT for the Terrified" Many people were then and still are quite terrified of IT so I continue to use that system with some success today!
So not wishing to cause offence but you will see why I consider your remark as quoted above quite condescending!

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Sun Mar 11, 2012 9:38 pm

No particular offence taken, but you brought the subject up by taking offence to my original notes! This is a computer forum, not an IT for the terrified course!

And besides, the number one thing to not do when teaching is confuse people by asking them to enter/write/do things that might be confused with other things. Teaching is not about telling people what to do, it's about imparting knowledge, empowering the student (at whatever level) to reason and comprehend.

Teaching is also about listening and understanding! I was your pupil and I gave you feedback. The only two 'issues' I had with your guide is that it will, for the reasons specified above, confuse by using 'test' for a website name and 'root' as the database name. QED: it confused the hell out of me and I supposedly know what I'm doing! Without the basic knowledge and reasoning as to why, I was powerless to make an informed choice and it took further research elsewhere. Clearly it is better, and more user-friendly (for beginners especially) to name the website something sensible rather than 'test' and to name the database more appropriately too, 'root' just doesn't help anyone and if more than one site is being deployed on the local server, or more than one person is working on their own site using the same WAMP installation as others, it's only going to screw things up in the short and long run.

The rest of my notes was/is advice for other people, people on these forums who like me would like to know the details rather than just punch in whatever they're told to, people who quite clearly by this post's title are having problems connecting to their database and up to now don't know what all the random settings are. You are free to take and use what you want for Guide1a, but please don't confuse my suggestions and notes with criticism. My notes are clearly not for your computer club, they are for the other people reading this forum question after things haven't worked out as expected, how else do you think I found your guide?

Let's leave it at that please and thank you for your guide which ultimately helped a lot.

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Mon Mar 12, 2012 4:36 pm

Re: MySQL or MySQLi for database type:
Just a follow up note about which database type to use that I mentioned in an earlier post. I asked my hosting company for their thoughts on the best to use for Joomla 2.5 and even though both will work on their servers, they currently recommend to stick with the MySQL version.

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Mon Mar 12, 2012 4:54 pm

Let's leave it at that please
I'll second that. Let's just agree to disagree! We all have our ways of doing things.
Re the MySQL v. MySQLi debate. I had the same advice from my server although I have read that the MySQLi is more secure!

It's a pity I wasn't that much further forward as I have nearly finished the second Guide and that takes in using FileZilla server as well as FileZilla Client. The main difference between Xampp and Wamp is that Xampp has the FileZilla server incorporated. But it is very easy to install the FZ server so that you can use it with Wamp. There is no real need for an FTP server on a localhost but it does get users used to using FTP which is much the better way of transferring files to a host. Again from a newbies point of view it is less intimidating to know that if it all goes pearshaped on the local server it is easy to uninstall everything and start again. A good confidence builder I find! This Guide suggests creating a new database in the same way as one would on a remote host with unique U/N, P/W, D/B Name and unique server name.

mrartist
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sun Nov 28, 2010 1:35 am
Location: Kent, UK

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

Post by mrartist » Mon Mar 12, 2012 5:20 pm

I've never used or understood the benefits of the FTP server settings/FileZilla Server in Joomla/WAMP, everyone seems to suggest to leave that section in Joomla alone when installing. I just use the FileZilla program (client?) to FTP my content up and down from the live site.

Is it possible that the FTP server way is a better way to keep things coordinated between a development site and the live site? i.e. keeping the databases and live content in sync?

At the moment I'm just planning on using Akeeba (pro) to upload to the local site when going live for the first time, and then later, if needs be, downloading a copy of the site later when wanting to do major improvements and updates/tests before uploading again. Not perhaps the simplest of processes in the short or long run but how else to keep live content/databases in sync with local changes and testing?

mitchell65
Joomla! Ace
Joomla! Ace
Posts: 1614
Joined: Mon May 23, 2011 12:28 pm
Location: Cornwall

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

Post by mitchell65 » Mon Mar 12, 2012 6:27 pm

mrartist wrote:I've never used or understood the benefits of the FTP server settings/FileZilla Server in Joomla/WAMP, everyone seems to suggest to leave that section in Joomla alone when installing. I just use the FileZilla program (client?) to FTP my content up and down from the live site.
Me too! Must go into that sometime. There must be a good reason for it being there.
mrartist wrote:Is it possible that the FTP server way is a better way to keep things coordinated between a development site and the live site? i.e. keeping the databases and live content in sync?
No I think you way as in the following quote is the only sure way of doing this. Programs like Dreamweaver allow for a syncronised system when you do an update but that is just uploading newer files . When it comes to database driven sites you have the to element, that of HTML and D/B tables. Can't see how that is done!
Every time you use the FTP (client) program to upload a site you are using the FTP client to connect to an FTP server on the host. Your remote host has an FTP server installed for you to connect to (with an FTP client program)! The integrated FTP server on Xampp and the installation of the FileZilla server program to use with Wamp makes using a localserver even more "Lifelike" that is working in exactly the same way as if you were using a remote host. No more just dragging and dropping files from your hard drive to the Wamp folders. All part of the learning curve and familiarization getting eady for transferring from the localserver to a remote Host. All this is in my Guide 2 complete with loads of pretty pictures!!
mrartist wrote:At the moment I'm just planning on using Akeeba (pro) to upload to the local site when going live for the first time, and then later, if needs be, downloading a copy of the site later when wanting to do major improvements and updates/tests before uploading again. Not perhaps the simplest of processes in the short or long run but how else to keep live content/databases in sync with local changes and testing?
I agree this seems to be the logical way of doing things although as you say a bit long winded! It has the added advantage though of making sure that you have a fairly recent backup of your complete site including the database in case you have server problems. Imagine getting hacked. All you do is delete the whole site on the host and reinstall complete from your backup. Wouldn't you just be pleased you had that backup then!

vernonschmiddy
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Mar 24, 2012 11:12 pm

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

Post by vernonschmiddy » Sat Mar 24, 2012 11:18 pm

hey mitchell65, thanks for the outstanding help on this one! Might have to get back to you about uploading the site to the server when I am ready... Cheers... Vern (Australia)

yudisarema
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Sep 09, 2011 11:10 am

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

Post by yudisarema » Mon Mar 26, 2012 2:42 pm

i have the same problem when i instal 2.5.3 :(
need help pls

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

yang di isi :
Data Base Type : Mysql
Host Name : locallhost
Username : root
Password : (blank )
Data Base Name : test
Table Prefix : tost_

Old Database Process *
Backup
Remove

yudisarema
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Sep 09, 2011 11:10 am

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

Post by yudisarema » Tue Mar 27, 2012 6:54 am

[ RESOLVED ]

just give the right database name


Locked

Return to “Installation Joomla! 2.5”