-2

I have a laravel project running inside docker. What I want to do is connect to a new database from a sql dump (.sql file).

What I did is modify the .env file and the config/database.php file as specified by this.

So, how could I create the new database from the dump file?

Dexter Naru
  • 185
  • 2
  • 4
  • 14

1 Answers1

0

If u want to create a database from the dump file, you can do it with this UNIX command line.

mysql -u username -p database_name < file.sql

OR via MySQL command line.

mysql> CREATE DATABASE database_name;
mysql> use database_name;
mysql> source file.sql;

OR connect your database with your favorite database tool and use import option.

Anyway, your question has nothing to do with Laravel.