Importing a database dump in MySQL

The below command is one that you need to remember:
mysql -u <user> -p < db_backup.dump
Just fired up the windows command line, and ensured my local MySQL server is running. I then just now ran the above command to do the import. Remember, that you may specify the exact path to the dump file as well, if it does not reside in the working directory of MySQL.

Also note that the .dump file could have also been originally exported as a .sql, in which case the process will be the same. This import took a 400 meg database dump about 6 minutes to load on my system. If you are running a SSD setup, expect much faster load times :-)

Happy importing and exporting people

www.silvafox.co.za

Comments

Popular posts from this blog

Moving Data [Spark Streaming - simple data files]

Notepad++ Regular expressions

RSS feeds to your webpage [part 1]