Support the ongoing development of Laravel.io →
Installation Configuration Database
Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

In my case it said bind-address = 10.0.2.15 so I changed it as you said and it worked! Thanks!

Last updated 1 year ago.
0

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!

0

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

0

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.

Last updated 7 years ago.
0

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!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

TheMonk themonk Joined 5 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.