Here’s how to pass the arguments to MySQL to restore from a Dump:
mysql [database name] < [backup file name]
[database name]” specifies the name of the database to restore, and “
[backup file name]” specifies the full path and filename to the file generated by mysqldump, such as backup.sql. You should also specify your MySQL username and password as usual using -uroot -ppassword.
If I wanted to restore the database named maindatabase from the file named backup.
sql, I would run:
mysql maindatabase< backup.sql
- Top 10 MySQL Tips and Tricks
- MySQL How to delete duplicate records and rows of data