Laravel Homestead / mysql 上的 El Capitan 连接失败
Laravel Homestead / mysql on El Capitan fails to connect
自升级到 El Capitan 后,我一直无法连接到 Homestead 实例上的 mysql。这发生在 Macbook Air 和 Macbook Pro 上,并且在两台机器上我都将 Vagrant、VirtualBox 和 Homestead 更新到最新版本。
我删除了我的 .vagrant-d
目录并销毁/重新安装了我的 Homestead 盒子。
我试过使用 SQLPro 和 mysql workbench-- 都无法连接。
SQLPro 的错误是:
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: Can't connect to MySQL server on '127.0.0.1' (4)
从命令行我也无法连接,并出现以下错误:
➜ ~ mysql -h 127.0.0.1 -u homestead -psecret -P 33060
Warning: Using a password on the command line interface can be insecure.
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0
这个问题基本上已经扼杀了我将近一周的工作效率。我已经尝试了几乎所有我能想到的方法。我的 SSH 密钥很好,因为我可以通过 SSH 连接到 Homestead 盒子,而且我知道 mysql 在那里 运行 因为我可以从 SSH 会话中连接到 mysql。
有没有人知道如何连接或至少对此进行故障排除?
谢谢!
编辑 /etc/mysql/my.cnf
并添加配置选项 skip-name-resolve
成功了!
自升级到 El Capitan 后,我一直无法连接到 Homestead 实例上的 mysql。这发生在 Macbook Air 和 Macbook Pro 上,并且在两台机器上我都将 Vagrant、VirtualBox 和 Homestead 更新到最新版本。
我删除了我的 .vagrant-d
目录并销毁/重新安装了我的 Homestead 盒子。
我试过使用 SQLPro 和 mysql workbench-- 都无法连接。
SQLPro 的错误是:
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: Can't connect to MySQL server on '127.0.0.1' (4)
从命令行我也无法连接,并出现以下错误:
➜ ~ mysql -h 127.0.0.1 -u homestead -psecret -P 33060
Warning: Using a password on the command line interface can be insecure.
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0
这个问题基本上已经扼杀了我将近一周的工作效率。我已经尝试了几乎所有我能想到的方法。我的 SSH 密钥很好,因为我可以通过 SSH 连接到 Homestead 盒子,而且我知道 mysql 在那里 运行 因为我可以从 SSH 会话中连接到 mysql。
有没有人知道如何连接或至少对此进行故障排除?
谢谢!
编辑 /etc/mysql/my.cnf
并添加配置选项 skip-name-resolve
成功了!