简体   繁体   中英

Reset MAMP Pro username and password to root/root

I don't have a clue how I managed to do it, but at some point over the past few days I've managed to change my MAMP Pro username and password to something other than root:root. I've been working locally on a Wordpress build so it must have been something I did then but like I said I haven't a clue how I did it.

I'd like to change the MAMP settings back to their default ones, as now all of my old sites are not working locally (unless I were to go into the config files of every single one and change the mysql username and password). I've tried the 'reset to factory settings' function in MAMP Pro but it doesn't seem to have changed the username and password, and I can no longer connect to MySql or to the MAMP Webstart screen.

Would a clean install sort this out? Also, how would I go about changing my MySql username and password if I cannot connect to it through MAMP?

Assuming you still know the password, you can change the password back to root using

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

It'll prompt you to enter a password again, after which it'll be reset to root

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM