Page 1 of 1

Can't access MySQL

PostPosted: 07. July 2010 05:11
by webuser

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

I edited "" 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.


Re: Can't access MySQL

PostPosted: 09. July 2010 01:41
by JonB
Did you first change the password in MySQL?

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

this may be helpful; lots of tips... ... -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.

(the fix tool is in the middle of the page)


Re: Can't access MySQL

PostPosted: 09. July 2010 12:59
by webuser
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 But it doens't change anything, still keeps asking for authentication.

(I looked at that page btw)

Can there be another problem?

Re: Can't access MySQL

PostPosted: 09. July 2010 14:35
by JonB
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



Re: Can't access MySQL

PostPosted: 10. July 2010 03:32
by webuser
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.

Re: Can't access MySQL

PostPosted: 10. July 2010 14:16
by JonB
My last try:

I edited "" 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.

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 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