Page 1 of 1

Error in running xampp

PostPosted: 13. May 2011 12:13
by t2010
I get the following error when i try to access phpmyadmin on my windows pc:

MySQL said:

Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


I think the cause is that the default username("root") and password("") was changed by a software i was trying to install.

How do I bring everything back to normal, I was thinking of un-installing and re-installing before, but im afraid of loosing
my existing database which i cannot access to back up.

Thanks.

Re: Error in running xampp

PostPosted: 13. May 2011 12:22
by Sharley
Which version of XAMPP?

Re: Error in running xampp

PostPosted: 13. May 2011 12:28
by t2010
xampp-win32-1.7.1

Re: Error in running xampp

PostPosted: 13. May 2011 12:31
by Sharley
Can you remember the name of the database?

If you can then I may be able to offer a solution to your problem.

Re: Error in running xampp

PostPosted: 13. May 2011 18:44
by t2010
There are a lot of databases there, but one is named zetadb.

Is there no way i can control the error without re-installing?

Re: Error in running xampp

PostPosted: 14. May 2011 00:42
by Sharley
Run resetroot.bat file.

Re: Error in running xampp

PostPosted: 27. June 2011 19:50
by xampperic
I hope I can jump in on this thread. It seems to directly relate to my problem.

Following the advice on the phpmyadmin page I set a mysql root password. Now I can't get back into phpmyadmin. I get the same error message as t2010.

I don't think my solution is to run resetroot.bat (in any case, I don't see this file). I don't want to reset root. I want to make the appropriate change in phpmyadmin so it will work with the new root password:
You should check the host, username and password in your configuration


I take it this means there's a phpmyadmin config file to adjust somewhere, but I don't see it anywhere. What do I need to do to get phpmyadmin to work now that there's a password (or new password in t2010's case) for root?

Thanks.

Re: Error in running xampp

PostPosted: 27. June 2011 20:46
by Sharley
The solution is the same for you.

Run the C:\xampp\mysql\resetroot.bat file then restart MySQL.
This removes the current root user password.
If you get an error that looks like a wrong path to the data directory (usr/bin/data or similar) then read the instructions below to edit the resetroot.bat file.

Now try and access phpMyAdmin using root user with no password.

If successful then create your password again and retry.

You can set the root user password from the Security menu item in http://localhost/index.php after running the above bat file to clear any existing passwords.


You may have to edit the resetroot.bat file as it was created for a Linux system - follow these instructions and all will be well.
Altrea wrote:here is the little fix in English:
- open resetroot.bat file in your editor.
- after the parameter "--no-defaults" add you mysql data directory with this syntax: --datadir=c:/xampp/mysql/data
- save the file
- execute the file
Thank Nobbie and Altrea for posting this fix.

There is also a guide here:
http://bravo.newnetenterprises.com/word ... -password/