Import existing database into Homestead

How to import existing database into Homestead in PhpStorm. Assumed that you go over installation of Homestead on PhpStorm.

Go into your working directory:

vagrant@homestead:~$ cd yourproject

Login to mysql:

vagrant@homestead:~/project-folder$ mysql --user=homestead --password=secret

Create database:

mysql> create database yourdatabasename;


mysql> exit;

First export database you want to import into Homestead with PHPADMIN or similar tool into root folder of your application. Than type bellow:

vagrant@homestead:~/project-folder$ mysql --user=homestead --password=secret yourdatabasename < exported_database.sql