Skip to content
MAMP Documentation

Change the MySQL root password

  1. Make sure the MySQL server is running in MAMP.

  2. Open the Terminal application (/Applications/Utilities/Terminal).

  3. Run the command for your MySQL version, replacing [NewPassword] with your chosen password:

    MySQL 5.7:

    /Applications/MAMP/Library/bin/mysql57/bin/mysqladmin -u root -p password [NewPassword]

    MySQL 8.0:

    /Applications/MAMP/Library/bin/mysql80/bin/mysqladmin -u root -p password [NewPassword]
  4. Enter the current root password when prompted (the default is root).

Open each of the following files in a text editor and update the password value:

  • /Applications/MAMP/bin/phpMyAdmin/config.inc.php
  • /Applications/MAMP/bin/phpMyAdmin5/config.inc.php
  • /Applications/MAMP/bin/phpMyAdmin6/config.inc.php