我无法使用 Sequel Pro 连接到我的 Sail PHPMyAdmin
I can't use Sequel Pro to connect to my Sail PHPMyAdmin
我在我的 Laravel 8 项目中使用 Sail,但我找不到使用 Sequel Pro 来查看我的数据库的方法。
当我 运行 ./vendor/bin/sail up -d
时,我的容器 运行ning 完美,我可以使用这些凭据在 http://localhost:8080/ 中访问我的 PHPMyAdmin :
- 用户名:
sail
- 密码:
password
但问题是当我尝试使用 Sequel Pro 时,出现错误:
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
我在 .env
中使用的凭据是:
- 主持人:
127.0.0.1
- 用户名:
sail
- 密码:
password
- 端口:
3306
我试过的:
- 将主机从
127.0.0.1
更改为 mysql
,就像我在 .env
中所做的那样,但我收到此错误:
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)
- 将端口从
3306
更改为 8080
,但出现此错误:
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)
编辑:According to this article,问题似乎是从8.0版本开始,Mysql更改了与服务器连接的加密模式,需要特定的插件来识别一个用户。
我找到了一些命令来 运行 解决这个问题,例如:
ALTER USER 'sail'@'server_ip' IDENTIFIED WITH mysql_native_password BY 'password';
但是我得到这个错误 Missing comma before start of a new alter operation
.
SET PASSWORD FOR 'sail'@'server_ip' = 'password';
但它没有任何改变。
./vendor/bin/sail down --rmi all -v
和 ./vendor/bin/sail up -d
但它没有任何改变。
但是问题没有解决,我也找不到任何解决方法。
我没有解决 Sequel Pro 的问题,但是 :
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
所以我下载了 Sequel Ace 并且一切正常:https://github.com/Sequel-Ace/Sequel-Ace
我在我的 Laravel 8 项目中使用 Sail,但我找不到使用 Sequel Pro 来查看我的数据库的方法。
当我 运行 ./vendor/bin/sail up -d
时,我的容器 运行ning 完美,我可以使用这些凭据在 http://localhost:8080/ 中访问我的 PHPMyAdmin :
- 用户名:
sail
- 密码:
password
但问题是当我尝试使用 Sequel Pro 时,出现错误:
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
我在 .env
中使用的凭据是:
- 主持人:
127.0.0.1
- 用户名:
sail
- 密码:
password
- 端口:
3306
我试过的:
- 将主机从
127.0.0.1
更改为mysql
,就像我在.env
中所做的那样,但我收到此错误:
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)
- 将端口从
3306
更改为8080
,但出现此错误:
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)
编辑:According to this article,问题似乎是从8.0版本开始,Mysql更改了与服务器连接的加密模式,需要特定的插件来识别一个用户。
我找到了一些命令来 运行 解决这个问题,例如:
ALTER USER 'sail'@'server_ip' IDENTIFIED WITH mysql_native_password BY 'password';
但是我得到这个错误Missing comma before start of a new alter operation
.SET PASSWORD FOR 'sail'@'server_ip' = 'password';
但它没有任何改变。./vendor/bin/sail down --rmi all -v
和./vendor/bin/sail up -d
但它没有任何改变。
但是问题没有解决,我也找不到任何解决方法。
我没有解决 Sequel Pro 的问题,但是
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
所以我下载了 Sequel Ace 并且一切正常:https://github.com/Sequel-Ace/Sequel-Ace