Page 1 of 2

Unable to connect to the database:Could not connect to MySQL

Posted: Fri Mar 28, 2008 3:49 pm
by sagarn
Hi Friends,

I am new to Joomla .. downloaded all the softwares and the PDF file containing the guide to quickstart .. installed the XAMPP ... everything is working fine till .. all the services have started .. Apache Server.. MySql service..

THe problem comes when i start installing of Joomla ... after entering the details of the database configuration as per the guide i am getting following Error ..
Unable to connect to the database:Could not connect to MySQL
I tried almost all .. uninstalled the whole pack .. reinstalled. . restarted the comp .. but nothing is helping me ..

Can anyone tell me what could be the reason for this error ? Please ..

Awaiting for replies and help ..

Regards,

Sagar

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Mar 28, 2008 10:29 pm
by moonstar2005
keep on clicking backwards and try. It took me 4 tries to connect to the server

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Sat Mar 29, 2008 1:03 am
by tresh49
Did you find a solution to this because I have the same problem. I've tried refreshing the page and hitting the url several times but it doesn't work. I've double checked the database username and password. Any help is appreciated.

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Sat Mar 29, 2008 1:36 am
by tresh49
My host provided a quick install tool called SimpleScripts. When I used that I clicked the option to create the database automatically which solved the problem I was having.

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Sat Mar 29, 2008 5:30 am
by sagarn
Somehow i was able to find out a solution for the problem ..

from PhpMyAdmin panel i created one database.. named it demo.

The from the privileges i reset all the passwords of the root user. and kept no password for the same.

saved the settings and checked with the installation of Joomla..

IT WORKED ... .may be the database in Joomla was not getting connected.

Anyways .. the problem is solved .

Hope this will help you guys as well.

By the way thanks for all the replies.

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Sun Apr 06, 2008 3:42 pm
by elvisparsley
Go to PHPmyadmin.

Select the database and click Privileges.

Select no password, if you are not using it. If you are using password, fill up newpassword.

Click Go.

Try it one more time.

it should be ok by now.

Cheers. :)

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Thu Apr 24, 2008 3:25 pm
by observado
[quote]elvisparsley on Sun Apr 06, 2008 3:42 pm
Go to PHPmyadmin.

Select the database and click Privileges.

Select no password, if you are not using it. If you are using password, fill up newpassword.

Click Go.

Try it one more time.

it should be ok by now.[quote]

I have the same problem but am new to all of this: "Unable to connect to the database:Could not connect to MySQL" after Database Configuration. I assume the "PHPmyadmin" elvis refers to is the subdirectory under "xampp". If so, what database should be clicked on? If not, where is it and what the heck do I do next? :-)

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Thu Apr 24, 2008 4:13 pm
by humvee
Hi

I would suggest you take a look at http://docs.joomla.org/Beginners to get the information you are likely to need. In particular the Quick Start Guide, and in more detail the Installation Manual.

Andy

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Thu Apr 24, 2008 4:47 pm
by observado
Andy:

I just about have the Quick Start and the Installation Manual memorized at this point. In fact, I had one successful download and had completed the Smart Landscape tutorial. When it was time to go for the real thing, I could not exit the SL database. Every link from http://localhost/joomla15 in the QG to http://localhost/joomla15/administrator ... &task=help kept taking me back to the SL log in page. I ultimately removed both Joomla and Xampp and reloaded both. Xasmpp went fine but now I am stalled with reloading Joomla. I have searched the Quick Start Guide, Installation Manual and the forums. The thread I responded to was the only instance that I could find with the same error message that I have. I did come across and make the modifications to the code recommended in http://forum.joomla.org/viewtopic.php?f=429&t=281056 but it didn't make any difference.

I realize that that there may be a solution that has already been published. But between the copious "revision" notes in the Installation Manual, the obviously abbreviated instructions in the Quick Start and the large number of instances of others not being able to access the database for a number of reasons, I would appreciate a little direct assistance on how to address the "Unable to connect to the database: Could not connect to MySQL" error message following the Database Configuration page.

Thanks

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Thu Apr 24, 2008 5:16 pm
by humvee
Access XAMPP control panel by putting localhost in your Web Browser.
The PHPMyAdmin being referred to is in the XAMPP menu about 3/4's the way down. Click the link to open the PHPMyAdmin interface with the MySQL database.
When the start page of the database appears (or it might be a login screen first off if you have added any passwords to this during set up) you will see a an input field for Create Database - enter a name for the database you are going to create. In the field immediately next to it you will see (probably) the word Collation selected from a whole list of names. Scroll down this list an select Utf-8 unicode. In the box immediately above these two you will see another list in this make sure that UTF-8 unicode is selected.
Now click the Create button.
All being well you will get a confirmation screen pop up on the screen Database xyz has been created.

If you have not added any passwords during set up of XAMPP your MySQL settings will now be host=localhost username=root password = (nothing at all as you have not entered one) Database Name= (whatever you have just named your database) the type box at the top should be mysql. These are the settings that you will enter into Joomla! Installation at Step 4. You do not need to do anything at Step 5 as you are on Windows and on a localhost.

You don't need to make any modifications from the post you quoted as you are naming the databases yourself. (anyway 1.5.3. is now out and corrects that fault)

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Thu Apr 24, 2008 6:16 pm
by observado
humvee:

Thanks!! I'm in and have created the correct database. Now the adventure really begins.

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Thu Apr 24, 2008 10:30 pm
by humvee
Glad it is working for you.

Enjoy Joomla!

Thanks

Andy

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Sun Apr 27, 2008 1:14 pm
by huzefa_husain
hey thanks sagar..

your tips worked for me ....

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri May 02, 2008 6:48 pm
by rksenthilkumaar
Thanks a lot Humvee,
It worked for me too... though I'm using the 1.5.3 I struggled a lot...
But your steps worked perfectly...
Thanks again..

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 3:14 am
by jessiered
Oh my.. I want to start my adventure but I still have this "Unable to connect to the database:Could not connect to MySQL"

I tried to go to the PhpMyAdmin and click database -> priviledge -> Go. but this did not work. Is there anyone out there who is kind enough to share more solutions.

Cheers!
Thanks in advance!

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 8:58 am
by joomnewbie79
Did you insert the database name and password in the configuration.php file?

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 11:42 am
by jessiered
Hi there thank you for replying to my msgs.

I haven't inserted any database name and password in the configuration.php file. I do not know how to insert it and the codes to use and in what part. Can you please help me with it. I am so newbie.

Thanks in advance again :)

Jessiered

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 11:46 am
by jessiered
Hi again!

I also have another question. Why is it that whenever I close my computer and open it again. And then opened my Wamp server and go to http://localhost/phpmyadmin/ nothing appears on the window screen? Is there anything more that I should do, should I start the services or restart or? I'm so thinking about this.

Thanks in advance :)

Jessiered

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 2:05 pm
by Stanoz_dot_com
Me, I got the error message:

Error
An error has occurred.:
Some errors occurred in backing up the database.
SQL=D:
- - - - - - - - - -
D
= = = = = = = = = =

SQL=D:
- - - - - - - - - -
D
= = = = = = = = = =

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 2:21 pm
by jessiered
Hey stanotz can we chat? make your posts 5. thanks

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 2:27 pm
by joomnewbie79
jessiered wrote:Hi there thank you for replying to my msgs.

I haven't inserted any database name and password in the configuration.php file. I do not know how to insert it and the codes to use and in what part. Can you please help me with it. I am so newbie.

Thanks in advance again :)

Jessiered
Open the config.php in a PHP editor and replace lines 6 and 7 with:
var $user = 'your database name';
var $password = 'your database password';

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 2:33 pm
by joomnewbie79
By the way, somebody help me with the Joomla 1.5.9 sql files.
When I import them into the phpMyAdmin query window I get any kind of syntax errors.

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 3:25 pm
by jessiered
what do you mean? can you explain further? by the way thanks for the reply. :)

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Fri Jan 16, 2009 4:00 pm
by joomnewbie79
You had this problem with access to the database, but it sounds like you've managed to create the database contents. The Joomla database content, to what I know, should be created by importing into the phpMyAdmin query window the .sql files coming with the package.
The problem I'm experiencing is that the database panel always returns a 1064 syntax error when I run the joomla.sql file in the query window. As a final user with no programming knowledge, when I install a readymade PHP/SQL script I expect it to be coded correctly, I can't do even custom programming work to fix scripting errors or make the script fit to my server.
I'm trying to install Joomla 1.5.9 on a server with PHP 5 and phpMyAdmin 2.6.4.
What version of Joomla and phpMyAdmin are you using?

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Sat Jan 17, 2009 12:46 am
by jessiered
Im using Jooma 1.5.9 and wampserver 2.0
My problem is solved about the connection to the database, thank you to all those who have helped me.
My problem now is my wampserver, whenever I close my computer and open it again the http://localhost/ is blank. Do you know anything that deals with this? What is the solution to this?
Thanks i advance

Jessiered

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Mon Jan 19, 2009 9:55 am
by LoveDJ
OK guys i really reaaallyy need your help
I tried wamp and then according to this site xampp
On both occasions,i could not connect with database,(how do you even make one)even I looked at several tutorials,where in one with xampp I need to use php admin and I cant find it and according to another tutorial I do not need to do that everything is trough browser install and still doesn't work.After that I continuously received this message: Access Violation address 1000A1F7 in module libmysql.dll it stopped when I shutdown and deleted from startup.

I have joomla 1.5,xampp 1.7 with patch or Wamp 2,XP 64- sp2,and I do not have web host this is all local,'cause I want to get myself familiar with it.Also I am completely newbie when it comes to MySQL and databases at all.

Please help me to install joomla,the basic problem is databes,could not connect and blah blah blah,you know the drill :)

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Mon Jan 19, 2009 11:03 am
by jessiered
Hi LoveDJ,

Please install wamp. That would be better than xampp (in my opinion). When you have installed wamp and installed the Joomla folder inside the www files and renamed it restaurant and still have problems, just post your problem here and I will try to help you. Because I had that same problem past days.

The reason you could not connect is try to make your PASSWORD "BLANK" means in the password area do not put anything. And it will work. :)

Jessiered

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Mon Jan 19, 2009 5:14 pm
by LoveDJ
for some reason i did everything like before and now it works.
I am using wamp.Couple of questions: I need a very good tutorial with including how to make forums,also I always loose connection even though this is just on my local machine,no web,and that can be annoying and it makes problem

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Mon Jan 19, 2009 11:11 pm
by Stanoz_dot_com
I've found the solution!

I was trying to access a MySQL database with a user account that had limited prividges!

You can't do that!

That's what all of us have been doing wrong!

I, since I'm still learning, have taken recourse to using the default XAMP account called "root".
You don't need to enter a password for that account. (You shouldn't!)
There is no password for it.
:)

I hope you got that, jessiered. (I see you got my Yahoo! handle. Holler whenever you wanna talk... :) )

Re: Unable to connect to the database:Could not connect to MySQL

Posted: Tue Jan 20, 2009 3:31 am
by jessiered
What yah mean yahoo handler Stanoz_dot_com?

Jessiered