0
0
MySQLquery~10 mins

Why backup strategy prevents data loss in MySQL - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a backup of the database named 'shop'.

MySQL
mysqldump -u root -p [1] > shop_backup.sql
Drag options to blanks, or click blank then click option'
Ashop
Bbackup
Crestore
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'backup' instead of the database name.
Using 'restore' which is for restoring, not backing up.
2fill in blank
medium

Complete the code to restore the backup file 'shop_backup.sql' into the 'shop' database.

MySQL
mysql -u root -p [1] < shop_backup.sql
Drag options to blanks, or click blank then click option'
Ashop
Bbackup
Crestore
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'backup' instead of the database name.
Using 'delete' which is unrelated.
3fill in blank
hard

Fix the error in the backup command to correctly save the 'inventory' database.

MySQL
mysqldump -u root -p [1] > inventory_backup.sql
Drag options to blanks, or click blank then click option'
Abackup
Binventories
Cinventory
Dinventory_backup
Attempts:
3 left
💡 Hint
Common Mistakes
Adding '_backup' to the database name in the command.
Using plural form 'inventories' instead of 'inventory'.
4fill in blank
hard

Fill both blanks to create a backup of the 'sales' database and save it as 'sales_backup.sql'.

MySQL
mysqldump -u [1] -p [2] > sales_backup.sql
Drag options to blanks, or click blank then click option'
Aroot
Badmin
Csales
Dbackup
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'admin' as user when 'root' is expected.
Using 'backup' as database name instead of 'sales'.
5fill in blank
hard

Fill all three blanks to restore the 'customers_backup.sql' file into the 'customers' database using user 'admin'.

MySQL
mysql -u [1] -p [2] < [3]
Drag options to blanks, or click blank then click option'
Aroot
Badmin
Ccustomers
Dcustomers_backup.sql
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'root' instead of 'admin' as user.
Mixing up database name and backup file name.