Solved it. Here's what I did for anyone else having this problem.
First SSH into vagrant, next run the following command:
cat /etc/mysql/my.cnf | grep bind-address
That will either confirm the MySQL bind address is 127.0.0.1 or it will display another number. If the number is different edit your MySQL Hostname with the new number. Note that in this case I also had to change the MySQL port from 33060 (which is what Homestead indicates to use) to 3306.
At this point test your connection, if all is good you'll be prompted to enter your MySQL pass and you're done.
In my case it said bind-address = 10.0.2.15 so I changed it as you said and it worked! Thanks!
Hey there,
I just setup homestead with php-7 and the command outputs 0.0.0.0 for the mysql bind-address. But using this works as well.
Thanks for the tip!
You may be overcomplicating things by using the SSH tunneling method. You can just use the Standard TCP/IP mode.
As the 5.3 docs say: "To connect to your MySQL or Postgres database from your host machine via Navicat or Sequel Pro, you should connect to 127.0.0.1 and port 33060 (MySQL) or 54320 (Postgres). The username and password for both databases is homestead / secret."
https://laravel.com/docs/5.3/homestead#connecting-to-databases
Thanks ssundheim that solved it.
However, if I run: cat /etc/mysql/my.cnf | grep bind-address on my homestead vagrant machine it outputs nothing. I can find the address here: /etc/mysql/mysql.conf.d$ cat mysqld.cnf| grep bind-add ress as bind-address = 0.0.0.0
I still can't connect via ssh with my workbench, but regular tcp/ip does the trick.
ssundheim said:
You may be overcomplicating things by using the SSH tunneling method. You can just use the Standard TCP/IP mode.
As the 5.3 docs say: "To connect to your MySQL or Postgres database from your host machine via Navicat or Sequel Pro, you should connect to 127.0.0.1 and port 33060 (MySQL) or 54320 (Postgres). The username and password for both databases is homestead / secret."
https://laravel.com/docs/5.3/homestead#connecting-to-databases
Thank you! That worked for me!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community