Search

FAQ

How do I change the password of the MySQL root user?

  1. Open the macOS Terminal Application located in your “/Applications/Utilities” directory.
  2. Enter the following command line:
    • 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]
  3. Replace [NewPassword] with your new password.
  4. Please bear in mind that you also have to change the phpMyAdmin configuration and probably your own PHP scripts to use the newly created MySQL password. For changing the phpMyAdmin configuration edit the following files and update the password.
    • /Applications/MAMP//bin/phpMyAdmin/config.inc.php
    • /Applications/MAMP//bin/phpMyAdmin5/config.inc.php