Home  >  Article  >  PHP Framework  >  Several ways to connect to the database in Laravel Homestead

Several ways to connect to the database in Laravel Homestead

灭绝师太
灭绝师太Original
2021-12-01 12:18:001670browse

Several ways to connect to the database in Laravel Homestead

Laravel Homestead is Laravel's official pre-packaged Vagrant Box. It provides you with a perfect development environment. So how to connect to the database smoothly? This article takes MySQL as an example to sort out several commonly used centralized methods.

1.Navicat for MySQL

## This is a common database management tool. How to use Navicat, please see the figure below:

Several ways to connect to the database in Laravel Homestead

Several ways to connect to the database in Laravel Homestead

2.PhpStorm

This is a software developed by JetBrains A PHP integrated development tool with built-in connections

Several ways to connect to the database in Laravel Homestead

Several ways to connect to the database in Laravel Homestead

## 3. Through internal connections

vagrant up
vagrant ssh

//注:需要在homestead目录下执行

Several ways to connect to the database in Laravel Homestead Related video tutorial recommendations:

Laravel

Video Tutorial

The above is the detailed content of Several ways to connect to the database in Laravel Homestead. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn