The following will allow you to use a sql dump to overwrite an existing database.
- If the file is gzipped, run
gunzip name_of_file.sql.gz
- Copy the file to the server
- Replace the database with the sql dump.
mysql -uusername –p database_name < file.sql
- On Laravel Homestead, this would be
mysql -uhomestead -p homestead < file.sql
Or this if the above is outputting a bunch of help text:
cat file.sql | mysql database_name -uusername -p