Page 1 of 1

I changed the password in the console and broke Xampp

PostPosted: 18. January 2019 12:35
by dumb
Hi all, new here, first post...

I changed the password by following this:

Code: Select all
How can I set a root password in MySQL?

    Configure it with the "XAMPP Shell" (command prompt). Open the shell from the XAMPP control pane and execute this command:
    mysqladmin.exe -u root password secret
    This sets the root password to 'secret'.


Now my phpmyadmin won't login. Where do I update the password to phpmyadmin?

Image

Re: I changed the password in the console and broke Xampp

PostPosted: 18. January 2019 17:51
by Altrea
In phpmyadmins configuration file config.inc.php

Re: I changed the password in the console and broke Xampp

PostPosted: 21. January 2019 10:32
by dumb
Thanks! I finally worked it out.

Anyone looking for this solution in future:

Go in to your XAMPP directory, and look for a folder called phpMyAdmin, for me it was c:\xampp\phpMyAdmin
and look for a file called config.inc.php

Open it in an editor (like notepad) and change the password to secret.

So it should look like this:

Code: Select all
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'secret';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';


Then go to your XAMPP control panel and stop/start Apache and MySQL. Then things will be back to normal again. Yay! :D