MacOSX homebrew mysql root password

前端 未结 21 1634
自闭症患者
自闭症患者 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:27

    Got this error after installing mysql via home brew.

    So first remove the installation. Then Reinstall via Homebrew

    brew update
    brew doctor
    brew install mysql
    

    Then restart mysql service

     mysql.server restart
    

    Then run this command to set your new root password.

     mysql_secure_installation
    

    Finally it will ask to reload the privileges. Say yes. Then login to mysql again. And use the new password you have set.

    mysql -u root -p
    

提交回复
热议问题