Homestead - Connecting to my database

前端 未结 6 1726
渐次进展
渐次进展 2021-01-17 23:52

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

vagrant init laravel/homestead

and aft

6条回答
  •  北海茫月
    2021-01-18 00:14

    The Homestead documentation says that you should use address 127.0.0.1 port 33060 to connect. I made a test and it worked.

    A homestead database is configured for both MySQL and PostgreSQL out of the box. To connect to your MySQL or PostgreSQL database from your host machine's database client, you should connect to 127.0.0.1 and port 33060 (MySQL) or 54320 (PostgreSQL). The username and password for both databases is homestead / secret.

    Source: https://laravel.com/docs/5.8/homestead#configuring-homestead

提交回复
热议问题