Setting Up Homestead to Work with MySQL Workbench

I just started using Homestead today, and still I don’t think I know what I am doing, I used to use the built-in PHP server that comes with Laravel and I had the MySQL server and workbench installed separately on my computer.

With this setting, I was able to easily connect to my database, however, since I started my Homestead, I can’t access this database again. This error continues to appear:

3/3 ErrorException in Connector.php line 47: SQLSTATE[HY000] [1045] 
Access denied for user 'myproject_db101'@'localhost' (using password: YES) 
(View: /home/vagrant/Projects/myproject/resources/views/layout/index.blade.php) 
(View: /home/vagrant/Projects/myproject/resources/views/layout/index.blade.php) 

How can i fix this?

+4
source share
3 answers

, , . , , .

  • ip- homestead . Homestead.yaml ~/.homestead. . , . ip- 192.168.10.10.
  • Mysql hostname = 192.168.10.10 port = 3306 username = homestead password = secret
  • .

. , .

+13

MySQL homestead: : root : secret

MySQL Workbench ( VM), localhost:33060 ( : ). 3306 .

, , , , localhost 3306.

+1

, . 'myproject_db101'@'localhost' , localhost. (, root) .

0

All Articles