MacOSX homebrew mysql root password

前端 未结 21 1618
自闭症患者
自闭症患者 2020-12-04 05:43

For some reason MySQL stopped giving access for root. Uninstalled and reinstalled with Homebrew. Fresh install, fresh tables but when I enter

mysql -u root -         


        
21条回答
  •  既然无缘
    2020-12-04 06:06

    Terminal 1:

    $ mysql_safe
    

    Terminal 2:

    $ mysql -u root
    mysql> UPDATE mysql.user SET Password=PASSWORD('new-password') WHERE User='root';
    mysql> FLUSH PRIVILEGES;
    mysql> quit
    

提交回复
热议问题