Search code examples
phpmyadminsequelprolaravel-sail

I can't use Sequel Pro to connect to my Sail PHPMyAdmin


I'm using Sail in my Laravel 8 project and I can't find a way to use Sequel Pro to see my database.

When I run ./vendor/bin/sail up -d, my containers are running perfectly and I can access to my PHPMyAdmin in http://localhost:8080/ using these credentials :

  • Username: sail
  • Password: password

But the problem is when I try to use Sequel Pro, I have an error :

Connection failed!

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

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

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

The credentials I use in my .env are :

  • Host: 127.0.0.1
  • Username: sail
  • Password: password
  • Port: 3306

What I tried:

  • Change the host from 127.0.0.1 to mysql like I have in my .env, but I get this error:
Unable to connect to the mysql host, or the request timed out.

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

MySQL returned: Unknown MySQL server host 'mysql' (0)
  • Change the port from 3306 to 8080, but I get this error:
Unable to connect to host 127.0.0.1, or the request timed out.

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

MySQL returned: Can't connect to MySQL server on '127.0.0.1' (4)

EDIT: According to this article, the problem seems to be since version 8.0, Mysql has changed the encryption mode of the connection to the server and requires a specific plugin to identify a user.

I found some commands to run to fix this problem, like :

  • ALTER USER 'sail'@'server_ip' IDENTIFIED WITH mysql_native_password BY 'password'; But I get this error Missing comma before start of a new alter operation.
  • SET PASSWORD FOR 'sail'@'server_ip' = 'password'; but it changes nothing.
  • ./vendor/bin/sail down --rmi all -v and ./vendor/bin/sail up -d but it changes nothing.

But the problem isn't fixed and I don't find any way to fix this.


Solution

  • I didn't fix the probleme with Sequel Pro, but according to this article:

    For those who is still struggling with Sequel Pro problems: Sequel Pro was a great product, but with tons of unresolved issues and last release being dated to 2016 perhaps it's a good idea to look for some alternatives. There is a fork of SequelPro called SequelAce that seems to be pretty stable and up-to-date, it keeps similar functionality, similar look and feel, yet at the same time it is devoid of old Sequel Pro problems

    So I downloaded Sequel Ace and all works fine: https://github.com/Sequel-Ace/Sequel-Ace