doubi9255 2017-12-19 03:46
浏览 74

从Laravel vagrant box连接到MySQL

I am using Sequel Pro on Mac and trying to see my database schemas that Laravel created. In the migrations folder I see a users and password reset tables. I am trying to see them in sequel pro which I do not.

I used homestead and the vagrant box is up. The homestead.yaml is set to defaults to:

IP: 192.168.10.10
MySQL db: homestead

In the .env file I see the defaults too:

IP: 127.0.0.1
MySQL: homestead
User: homestead
Password: secret

I try to use both IP's but can't seem to connect and if I do connect with 192.168.10.10 I see 0 tables. What am I missing? New to Vagrant and Laravel too.

  • 写回答

1条回答 默认 最新

  • dongnao9525 2017-12-19 12:35
    关注

    You should try to declare the DB connection to

    config/databases.php

    note that you can declare multiple DB connections here if you don't use .env for course.

    then try php artisan cache:clear

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器