Authentication plugin error while connecting to MySQL database

前端 未结 1 1413
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 01:51

I am working on macOS ver 10.13.5 - the newest one actually.

I usually work with Laravel projects (5.6), and so I am using brew services isntaller to make local envi

相关标签:
1条回答
  • 2021-01-01 02:44

    The error message appears because MySQL v8 changed the default authentication plugin / method, which has no backwards compatibility with older clients. The error can be worked around by using the legacy authentication method, which can be enabled for the root user by doing the following:

    After installing MySQL, authenticate using the CLI e.g

    mysql -uroot

    Then run the following command to use the old authentication method:

    ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY 'PASSWORD';

    Lastly, flush the privileges:

    FLUSH PRIVILEGES;

    Now you should able to connect using SequelPro again (using the specified password).

    0 讨论(0)
提交回复
热议问题