Cannot connet

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cannot connet

Postby urb » 12. November 2007 13:20

XAMPP has been installed and working correctly just fine. Today I have a problem connecting and I cannot not think of anything that change.

When I try and run phpmyadmin I get the message:

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.

When I try and run the CD Collection demo I get:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\xampp\htdocs\xampp\cds.php on line 64
Could not connect to database!

When I try and run an application I get:
Access denied for user 'E_Gov'@'localhost' (using password: YES)

If I try without a password I get the same error message.

When is config.inc.php located?

Any suggestions would be greatly appreciated.

Urb
Urb
urb
 
Posts: 6
Joined: 07. October 2007 01:37
Location: New Jersey

Postby Scory » 12. November 2007 13:49

The file config.inc.php is within the folder phpmyadmin.

But youre problem seems to be more seriously - looks like youre mysql database has been corrupted, or the users and/or passwords have changed for any reason.

Do you know MySQL users and their passwords?

Greets
Scory
Scory
 

Cannot connet

Postby urb » 12. November 2007 14:08

I do know MySQL users and passwords.

Is there a command line interface for XAMPP mysql?

Urb
Urb
urb
 
Posts: 6
Joined: 07. October 2007 01:37
Location: New Jersey

Cannot connet

Postby urb » 12. November 2007 14:24

Thanks for your help. I edited cpmfog.ind.php and changed the 'password' entry. Life once again goes on :D

Thanks again.

Urb
Urb
urb
 
Posts: 6
Joined: 07. October 2007 01:37
Location: New Jersey

Postby LooseCannon » 12. November 2007 14:37

Hmm, the olde "it did, now it don't work" situation... Some thoughts:

Default setup still, so root has _no_ password? That's how line 64 of cds.php tries to connect.
'root'@'localhost' (using password: NO) in C:\xampp\htdocs\xampp\cds.php on line 64

If so, http://localhost/phpmyadmin/ with user 'root', blank password and then Enter might get you in.

I've little idea about command line access, but use SQLyog to check set up, passwords and access rights in conjunction with phpMyAdmin. Try it with some 'known' users and passwords.
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Re: Cannot connet

Postby Scory » 12. November 2007 14:53

urb wrote:Is there a command line interface for XAMPP mysql?
Urb


Of course there is! And please, it is NOT(!) XAMPP mysql - it's simply MySQL, nothing more or less.

You will find a mysql.exe in your MySQL bin folder (c:\xampp\mysql\bin\mysql.exe or similar). This is the main SQL-Commandline-Interpreter. You should start it by passing username and password:

Code: Select all
C:> mysql --user=root --password=xxxxxx


On successfully login it will prompt you for SQL Command, which must be delimited by semicolons. You may also pass a default database name to mysql.exe:

Code: Select all
C:> mysql --user=root --password=xxxxxx databasename


Enter "quit" in mysql-Interpreter to quit session.

Greets
Scory
Scory
 


Return to XAMPP for Windows

Who is online

Users browsing this forum: DrSeussFreak and 64 guests