MySQL

Import MySQL database from sql file

To import a database from a sql file, make sure that the database already exists.
The content of the database will be replaced!

Execute the following command:

mysql -h localhost --user=root --password=your_password -p database_name < mydatabase.sql