Sequel Pro and MySQL connection failed

后端 未结 7 1478
青春惊慌失措
青春惊慌失措 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:34

    TL;DR: Sequel Pro is dead since 2016. Don't downgrade your DB because of a tool. Move on to an alternative tool.

    Update 2020: Sequel Pro is officially dead but unofficially alive! You can find the "nightly" builds that don't have this issue (i.e. support Mysql 8 auth) in here: https://sequelpro.com/test-builds


    All the other solutions here are recommending changing your DB settings (making it less secure, as advertised by MySQL) for the tool you are using. That's not acceptable to me.

    I have always been a huge fan of Sequel Pro, even donated to it. But, with all my passion and love, I am sorry if the tool doesn't have any release since 2016. YOLO, and I need to move on!

    The alternative I found (from https://stackoverflow.com/a/55235533/2321594, thanks to @arcseldon) is DBeaver which supports MySQL 8's new authentication (non-legacy) method.

    PS. The only trick in the tool side, not the DB side is when you are creating a MySQL 8 connection you might need to go to "Driver Properties" (later can be found in Edit Connection) and turn the value of allowPublicKeyRetrieval to true.

    I needed this to connect to my MySQL container created using Docker. To have the IP of MySQL be visible to the outside, for any other application in your ecosystem (not just this tool), you should either create a new user in MySQL, or pass -e MYSQL_ROOT_HOST=% in the run-time or as an ENV.

    0 讨论(0)
  • 2020-12-04 06:41

    If you connect to MySQL via root@127.0.0.1, make sure that you reset its password too!

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

    0 讨论(0)
  • 2020-12-04 06:43
    1. Assuming you don't have a mysql configuration, echo the following to ~/.my.conf
    [mysqld]
    default-authentication-plugin=mysql_native_password
    
    1. Sign into mysql with mysql -u root -p
    2. Set the root user password with ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '[PASSWORD]'; where [PASSWORD] is a password of your choosing.
    3. Restart mysql with e.g. brew services restart mysql
    0 讨论(0)
  • 2020-12-04 06:50

    It's working for me. if you are getting this error :

    Unable to connect to host 127.0.0.1, or the request timed out.

    Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

    MySQL said: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2):

    Plz try this solution

    0 讨论(0)
  • 2020-12-04 06:51

    If anyone facing this issue and installed MySQL version >8 through .dmg download from the official link. In that case please use this guideline.

    0 讨论(0)
  • 2020-12-04 06:52

    Sequel Pro is officially dead and no longer supports newer MySql features. However, the good news is that it was replaced by Sequel Ace which is available on GitHub and App store. The app is free of charge and looks like official replacement for Sequel Pro as the post was made by one of the collaborators of Sequel Pro.

    Ps. I decided to post this as an answer as others have not mentioned that there is now an up-to-date replacement for Sequel Pro

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