且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何查看我的laravel数据库?

更新时间:2023-12-02 15:48:34

在终端:




  • 进入项目目录


  • vagrant ssh


  • $ c> mysql -u [username] -p [password] - 例如 mysql -uhomestead -ppassword






Vaala!您已连接到MySQL ...







  • SHOW数据库;


  • USE [Database Name]; code> use Homestead;


  • DESCRIBE表; 查看所有表格


  • SELECT * from [table]; - 例如 select *来自用户



I've set functional laravel project, database connection works, I've added some tables via terminal but now I'd like to see it just as you can see everything with phpmyadmin, for example. How to locate the database file and how to open it, by default?

In Terminal:

  • cd into Project directory

  • vagrant ssh

  • cd into Project directory in machine

  • mysql -u[username] -p[password] - e.g mysql -uhomestead -ppassword


Vaala! You are connected to MySQL...


  • SHOW databases;

  • USE [Database Name]; - e.g use Homestead;

  • DESCRIBE tables; to see all tables

  • SELECT * from [table]; - e.g select * from users