Sequel Pro and MySQL connection failed

后端 未结 7 1479
青春惊慌失措
青春惊慌失措 2020-12-04 06:02

I just installed mysql on mac from Homebrew

brew install mysql

mysql -V

mysql  Ver 8.0.11 for osx10.13 on x86_64 (Homebrew)

from termina

相关标签:
7条回答
  • 2020-12-04 06:55

    This is because Sequel Pro is not ready yet for a new kind of user login, as the error states: there is no driver. Quick fix for non-homebrew installs:

    Apple Logo > System Preferences > MySQL > Initialize Database, then type your new password and select 'Use legacy password'

    After restart you should be able to connect. Do it only on fresh installs, because you may lost your db tables otherwise.

    mysql + homebrew

    Basically you will have to perform some actions manually, however- your database data won't be deleted like in solution above

    • Go to [my.cnf][1] file and in section [mysqld] add line:

      default-authentication-plugin=mysql_native_password

    • Login to mysql server from terminal: run mysql -u root -p, then inside shell execute this command (replacing [password] with your actual password):

      ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '[password]';

    • exit from mysql shell with exit and run brew services restart mysql.

    Should work.


    my.cnf

    The my.cnf file is located in /etc/my.cnf on Unix/Linux

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