Reset MySQL root password to “default” - MAMP

后端 未结 4 689
温柔的废话
温柔的废话 2021-02-06 12:54

I changed my root level password on phpMyAdmin. I was unsure where to enter the password itself, as it did not give me the option (login form). I wondered if it was the php.ini

4条回答
  •  孤独总比滥情好
    2021-02-06 13:36

    Look in the files:

    • checkMysql.sh
    • quickCheckMysqlUpgrade.sh
    • repairMysql.sh
    • stopMysql.sh

    The important one in this case is "quickCheckMysqlUpgrade.sh". All the files are located in the /Applications/MAMP/bin/ directory.

    In these files you'll find something like

    # /bin/sh
    /Applications/MAMP/Library/bin/mysqlcheck --quick --check-upgrade -u root -proot --socket=/Applications/MAMP/tmp/mysql/mysql.sock mysql
    

    When you see -proot that is the password MAMP will try to use, -p{password}.

    -p means "password" and whatever comes after is the password. So change "-proot" to eg. "-pmysecret" or whatever your password is.

提交回复
热议问题