Access denied for user root - mysql on MAC OS

后端 未结 10 1715
面向向阳花
面向向阳花 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 22:55

    I used to try all solutions but nothing worked. Finally and suddenly I found the solution! I use 10.5.8-MariaDB Homebrew.

        USE mysql;
        SELECT user, authentication_string, plugin, host FROM mysql.user;
    

    For some reasons authentication_string is invalid and it's what we need to fix

    Then just run the command below:

    ALTER USER 'root'@'localhost' IDENTIFIED BY '';
    

提交回复
热议问题