Importing the data exported by mysqldump
Importing data from a mysqldump
backup is easy and quick. In this recipe, we'll import a backup of the Internet Speculative Fiction Database (ISFDB). This database is licensed under the Creative Commons Attribution license (CC BY) which allows us to use this database for this recipe and many of the other recipes in this book.
How to do it...
Go to http://www.isfdb.org/wiki/index.php/ISFDB_Downloads and download the latest MySQL 5.5 compatible file. The file will be almost 80 megabytes and will be named with the date the backup was made. In this recipe, we'll be using the
backup-MySQL-55-2014-02-22.zip
file. We can download that file or a more recent one. If we do use a more recent file, we'll need to update the names in the following steps.After the download finishes, we unzip the file using the following command:
unzip backup-MySQL-55-2014-02-22.zip
When unzipped, the file will be over 300 megabytes.
Our next step is to launch the
mysql
command-line...