Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Change the MySQL Password in XAMPP

Set a strong password for the MySQL user in XAMPP with phpMyAdmin.

Databases1 min read8 steps7 screenshots

Steps

  1. Open the XAMPP Control Panel from the Start menu or the desktop icon.
    The XAMPP Control Panel
  2. Click Start next to Apache and MySQL. Wait until both turn green.
    Apache and MySQL running
  3. Click Admin next to MySQL. You can also open http://localhost/phpmyadmin/ in your browser. Click the User accounts tab (older versions call it Users).
    The user accounts tab in phpMyAdmin
  4. Find the user, for example root, and click Edit privileges.
    Choosing a user
  5. Click Change password.
    The Change password button
  6. Type the new password twice. You can use the generator to make a strong one.
    Entering the new password
  7. Click Go. A success message appears.
    Password changed
  8. Close phpMyAdmin. Restart MySQL in the XAMPP Control Panel.

After the change

phpMyAdmin in XAMPP stores the root password in C:\xampp\phpMyAdmin\config.inc.php. If you changed the password for root, set the same value in the line $cfg['Servers'][$i]['password']. Otherwise phpMyAdmin cannot sign in. Also update every script and app that used the old password.

Tip: Use a long, unique password. Limit access to your own computer and keep MySQL closed to the internet.

Quick recap

  • Start Apache and MySQL, then open phpMyAdmin.
  • Edit the user and choose Change password.
  • Update config.inc.php and your scripts.