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
tomysql
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
to8080
, 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 errorMissing 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.