-3

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
  • 213
  • 2
  • 5
  • 17
  • Does this answer your question? [How do I import an SQL file using the command line in MySQL?](https://stackoverflow.com/questions/17666249/how-do-i-import-an-sql-file-using-the-command-line-in-mysql) – tog22 Sep 25 '22 at 20:20

1 Answers1

1

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.