0
0
MySQLquery~10 mins

mysqldump usage - Interactive Code Practice

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

Complete the code to dump a database named 'shopdb' using mysqldump.

MySQL
mysqldump -u root -p [1] > backup.sql
Drag options to blanks, or click blank then click option'
Ashopdb
B-p
Croot
Dbackup.sql
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the username instead of the database name.
Using the password flag as the database name.
2fill in blank
medium

Complete the code to dump only the 'customers' table from 'shopdb'.

MySQL
mysqldump -u root -p shopdb [1] > customers_backup.sql
Drag options to blanks, or click blank then click option'
Aorders
Bcustomers
Cproducts
Dshopdb
Attempts:
3 left
💡 Hint
Common Mistakes
Using the database name again instead of the table name.
Choosing a wrong table name.
3fill in blank
hard

Fix the error in the command to dump all databases.

MySQL
mysqldump -u root -p [1] > alldb_backup.sql
Drag options to blanks, or click blank then click option'
A-all-databases
Ball-databases
C--all-databases
D--all_databases
Attempts:
3 left
💡 Hint
Common Mistakes
Using a single dash instead of two.
Replacing hyphens with underscores.
4fill in blank
hard

Fill both blanks to dump the 'shopdb' database with routines and triggers.

MySQL
mysqldump -u root -p [1] --[2] > shopdb_full_backup.sql
Drag options to blanks, or click blank then click option'
Ashopdb
Bskip-triggers
Croutines
Dall-databases
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--skip-triggers' which excludes triggers.
Using '--all-databases' when only one database is needed.
5fill in blank
hard

Fill all three blanks to dump the 'shopdb' database, including triggers and routines.

MySQL
mysqldump -u root -p [1] --[2] --[3] > shopdb_complete.sql
Drag options to blanks, or click blank then click option'
Ashopdb
Btriggers
Croutines
Devents
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the '--triggers' flag.
Using incorrect flag names.