【发布时间】:2015-11-13 03:31:49
【问题描述】:
自从升级到 El Capitan 后,我一直无法连接到 Homestead 实例上的 mysql。这发生在 Macbook Air 和 Macbook Pro 上,在这两台机器上,我都将 Vagrant、VirtualBox 和 Homestead 更新到了最新版本。
我删除了我的 .vagrant-d 目录并销毁/重新升级了我的 Homestead 盒子。
我尝试过使用 SQLPro 和 mysql 工作台——两者都无法连接。
来自 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。
有人知道如何连接或至少解决此问题吗?
谢谢!
【问题讨论】:
标签: mysql laravel vagrant osx-elcapitan