Restoring deleted 'root' user and password for MySQL

前端 未结 9 2007
独厮守ぢ
独厮守ぢ 2020-11-27 03:47

I accidentally deleted the root user on my local dev setup of MAMP/MySQL running on OS X. There are no other users created to get back into MySQL.

Thi

9条回答
  •  猫巷女王i
    2020-11-27 04:12

    I did exactly the same thing yesterday, being new to macs and the sql server. I accidentally deleted the root user because I pressed the wrong button in Privileges whilst trying to set up a new user and password.

    I did not have any work of any use on this computer so was not worried about deleting my websites.

    • I first uninstalled MAMP Pro (for which I had an icon in Launchpad).
    • I then deleted MAMP directory from the Applications folder.
    • I then reinstalled MAMP from the internet download.
    • I then DELETED all my cookies, cache etc from safari.
    • I shut down my computer and rebooted.

    I now have access to phpMyAdmin through the link on the startup page once MAMP is booted.

提交回复
热议问题