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
<NEWPASSWORD> 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:
Source: MAMP FAQ