phpmyadmin can't access mysql after changing localhost PW

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

Re: phpmyadmin can't access mysql after changing localhost P

Postby tedfull » 28. May 2013 22:31

In the phpmyadmin folder on your computer you will see a file called config.inc.php

Make sure to change this info with you new password:

/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = ' new password '; <---- This has to be changed to your new password
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;

There is another config file and I think that is what is messing with people.
tedfull
 
Posts: 1
Joined: 28. May 2013 22:24
Operating System: MAC OS X

Re: phpmyadmin can't access mysql after changing localhost P

Postby Altrea » 29. May 2013 03:53

Hi tedfull,

Thank you for your feedback.

tedfull wrote:There is another config file and I think that is what is messing with people.

There is only one config file and one sample file. The name is very clear i think :D

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: phpmyadmin can't access mysql after changing localhost P

Postby Tektek » 30. May 2013 22:12

Hi,

I have also the same problem. I have tried all of the above suggestions, but it still does not work.

I have tried the following:
1. run resetroot.bat in mysql;
2. http://localhost/security/index.php to reset one password;
3. in config.inc.php, I have changed to the following setting:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'testtesttest'; <- new password
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['compress'] = false;

4. in my.ini file I have also changed to new password:
password = testtesttest
port = 3306
socket = "/xampp/mysql/mysql.sock"
default-character-set = utf8

It still can not be connected. What is still missing at me? Thanks!

The original error is:
--------------------------------------------
Fehler
MySQL meldet:

#2002 -
Der Server antwortet nicht (evtl. ist der Socket des lokalen MySQL-Servers nicht korrekt konfiguriert).

Verbindung für den controluser, wie er in Ihrer Konfiguration angegeben ist, ist fehlgeschlagen.
-------------------------------------------

my SW version:
xampp: 1.8.1
os: windows 7
xampp control panel version: 3.1.0
Last edited by Tektek on 30. May 2013 22:31, edited 1 time in total.
Tektek
 
Posts: 3
Joined: 30. May 2013 21:55
Operating System: Win7

Re: phpmyadmin can't access mysql after changing localhost P

Postby hackattack142 » 30. May 2013 22:22

Hello,

You need to actually change the password in the database first before you can tell clients to use it.

If the root password is empty, you should be able to do this from the XAMPP security page
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: phpmyadmin can't access mysql after changing localhost P

Postby Tektek » 30. May 2013 22:38

hello,

yes I can change the password from the XAMPP security page, and did it. I have changed the password to "testtesttest". And then tried to adapt the password in config.inc.php and my.ini. But it still does not work.
Tektek
 
Posts: 3
Joined: 30. May 2013 21:55
Operating System: Win7

Re: phpmyadmin can't access mysql after changing localhost P

Postby hackattack142 » 31. May 2013 03:24

You should not be putting passwords in my.ini

As for config.inc.php, if you want to use the password in this config file, you need to change this:
Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'cookie';
from 'cookie' to 'config'
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: phpmyadmin can't access mysql after changing localhost P

Postby Tektek » 31. May 2013 11:19

It works! Thanks very much!
Tektek
 
Posts: 3
Joined: 30. May 2013 21:55
Operating System: Win7

Re: phpmyadmin can't access mysql after changing localhost P

Postby savvy » 23. August 2013 16:58

shukri_alquwatli I literally have no words to thank you. It's taken me two days to figure this out and I would've not done it without your post
savvy
 
Posts: 1
Joined: 23. August 2013 16:49
Operating System: windows vista

Re: phpmyadmin can't access mysql after changing localhost P

Postby skullduggary » 11. October 2015 02:03

I had the same problems, I have found the solution and everything is now accessible and running.

Install Xampp as usual, do not try to change anything initially. Goto https://community.apachefriends.org/f/viewtopic.php?f=16&t=67997&p=244660#p244660 but make sure you do not follow the first method as this also locked me out. Scroll down the page until you get to 1b. Setting root password with phpMyAdmin where you are setting the password for root through phpMyAdmin.

Once you have done the above then scroll down until you get to 2. Let phpMyAdmin know the changes and follow the steps.

Then you will be able to login entering root and your new password in the relevant fields on the form.

if only I had found this page several installs ago.
skullduggary
 
Posts: 4
Joined: 09. October 2015 23:50
Operating System: Win 7

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 130 guests