MacOSX homebrew mysql root password

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

    This worked for me for MAC https://flipdazed.github.io/blog/osx%20maintenance/set-up-mysql-osx

    Start mysql by running

    brew services start mysql

    Run the installation script

    mysql_secure_installation

    You will be asked to set up a setup VALIDATE PASSWORD plugin. Enter y to do this.

    Select the required password validation (Doesn’t really matter if it is just you using the database)

    Now select y for all the remaining options: Remove anon. users; disallow remote root logins; remove test database; reload privileges tables. Now you should receive a message of

    All done!

提交回复
热议问题