Homestead - Connecting to my database

Nicolas picture Nicolas · Jul 28, 2016 · Viewed 20.3k times · Source

I just created a fresh laravel project and I'm using a Homestead vagrant box by running

vagrant init laravel/homestead

and after

Vagrant Up

When I use vagrant ssh it gives me no problem and I can acces the vagrant box, however when I want to connect to the DB with Heidisql I get a connection error:

can't connect to mysql server on 'localhost' (10061)

Here's my setup

enter image description here enter image description here

the password I'm using = "secret"

Answer

Dami picture Dami · Aug 20, 2018

The usual credentials/info you need:

  • IP address 192.168.10.10 (Check your Homestead Folder>Homestead.yaml)
  • Port: 3306
  • User: homestead (all lowercase)
  • Pw: secret