我无法使用 Sequel Pro 连接到我的 Sail PHPMyAdmin



我在Laravel 8项目中使用Sail,但我找不到使用Sequel Pro查看数据库的方法。

当我运行./vendor/bin/sail up -d时,我的容器运行得很好,我可以在中访问我的PHPMyAdminhttp://localhost:8080/使用这些凭据:

  • 用户名: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)

编辑:根据这篇文章,问题似乎是从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';,但它什么也没改变
  • CCD_ 17和CCD_

但问题没有解决,我也找不到任何方法来解决这个问题。

我没有解决Sequel Pro的问题,但根据本文:

对于那些仍在与Sequel Pro问题作斗争的人来说:Sequel Pro是一款很棒的产品,但由于有大量未解决的问题,上一次发布日期为2016年,也许寻找一些替代品是个好主意。SequelPro的一个分支叫做SequelAce,它似乎非常稳定和最新,它保持了类似的功能,类似的外观和感觉,但同时它没有旧的SequelPro问题

所以我下载了Sequel Ace,一切都很好:https://github.com/Sequel-Ace/Sequel-Ace

最新更新