MySQL Basics In Pictures

Practice: Administering Databases

Task: The Dean of the college is concerned about losing the hardware database, because it would be difficult to reconstruct.

Put the Dean's mind at ease: Back up the hardware database and duplicate it to a new database named hardware_duplicate.

  1. Create a directory called db_backup in your Linux computer's home directory.
  2. Backup the database hardware to the text file hardware.sql at ./db_backup/hardware.sql.
  3. Connect to the MySQL database server and enter the MySQL root password to gain access to it.
  4. Create a new database named hardware_duplicate.
  5. Using the hardware.sql backup file, restore the hardware database to the new database hardware_duplicate.