direttamente dalla documentazione MAMP: http://www.mamp.info/en/documentation/

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


Open the Mac OS Terminal Application (located in "/Applications/Utilities") and enter the following command line:


/Applications/MAMP/Library/bin/mysqladmin -u root -p password

replace with your new password.
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 file and update the password:


/Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php