Access denied for user root - mysql on MAC OS

后端 未结 10 1716
面向向阳花
面向向阳花 2020-12-23 22:32

I know how do skip this problem on ubuntu, but how can i do it on MAC OS?

How can i set password for mysql on MAC?

1) Doesn\'t work

mysqladm         


        
10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-23 23:14

    The solution of

    UPDATE user SET authentication_string=PASSWORD("my_password") WHERE User='root';
    

    wasn’t working for me, but I did

    FLUSH PRIVILEGES;
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword';
    

    And was able to proceed. I’m using Ver 8.0.12.

提交回复
热议问题