Can't access MySQL

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

Can't access MySQL

Postby webuser » 07. July 2010 05:11

Hi,

I have another problem with my xampp. I can't access MySQL, not from the inside and not from the outside.

I edited "config.inc.php" to give it a password like it said in the documentation and further didn't change anything in the file. But it keeps asking me for an authentication again and again. And from the outside using another IP and over the internet it gives no access.



Thanks.
webuser
 
Posts: 13
Joined: 04. July 2010 05:34

Re: Can't access MySQL

Postby JonB » 09. July 2010 01:41

Did you first change the password in MySQL?

The password used in config.inc.php only supplies the password so phpMyAdmin will launch. It doesn't change the password.

this may be helpful; lots of tips...

http://rudyegenias.wordpress.com/2006/0 ... -database/

If not that then:

XAMMP has a built in ''fix' for phpMyAdmin and MySQL (I'm unsure if it will work if you have already 'messed' with stuff.

http://localhost/security
(the fix tool is in the middle of the page)

:shock:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Can't access MySQL

Postby webuser » 09. July 2010 12:59

No no, no messing with nothing. :)

Everything is just the way it was and supposed to be. I didn't change anything to that extend. :D

Anyway, still can't access it. Keeps asking for a password/authtentication. I can't change it in there either because I have to use the current one which doesn't work.

Yes I have a password set config.inc.php. But it doens't change anything, still keeps asking for authentication.

(I looked at that page btw)

Can there be another problem?
webuser
 
Posts: 13
Joined: 04. July 2010 05:34

Re: Can't access MySQL

Postby JonB » 09. July 2010 14:35

the order it has to be done in is:

Change the 'root' (or whatever) password in MySQL. You can do that with a Command Line statement, provided that the 'root' currently has no password.

open the Windows 'Command Shell' (DOS prompt)

change directory to the XAMPP\mysql\bin folder.

and then enter this line:
(your DOS prompt)
C:\xampp\mysql\bin> mysqladmin -u root password YourMySQLRootPassword

that's it - if you get the command prompt back with no complaints from MySQL, then the change has taken. It does not acknowledge successful commands, only failed ones.

THEN -- you make the changes to config.inc.php.

Voila!

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Can't access MySQL

Postby webuser » 10. July 2010 03:32

Well I don't see how that would make any sense, change the password first with cmd than in config_file.php again.

But in any case, as I said, it doesn't work.
webuser
 
Posts: 13
Joined: 04. July 2010 05:34

Re: Can't access MySQL

Postby JonB » 10. July 2010 14:16

My last try:

I edited "config.inc.php" to give it a password


This is a misunderstanding.

NOTHING you enter into a configuration file will change the password. They are all passive files that supply the correct credentials to the MySQL database, in order that the programs they are associated with programs can work.

the password is STORED IN THE MYSQL DATABASE ITSELF.
SO - Only an SQL directive/statement can change it.

That can come from:

A command line directive/statement (like I suggested), or by using a programmatic tool - like phpMyAdmin. Webmin, or the XAMPP Security Page because they all forms that will generate SQL statements that will update the database. (read the PHP code in the pages).

So -- Change the password, then update configuration files.

BTW - changing the 'root' password in config.inc.php ONLY really allows phpMyAdmin to work without prompting for a password. It doesn't do anything for programs like WordPress or Joomla or your own programs if you choose to write them. I don't know what you want to use MySQL for, but if you don't understand the abstraction of data from code -- you will never understand how things work.

Maybe if we knew what you were trying to use MySQL to support, we could better explain things.

Good Luck
:)

OSF
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 54 guests