MySQL 8.0 Database Administrator — Question 27
A valid raw backup of the shop.customers MyISAM table was taken.
You must restore the table.
You begin with these steps:
1. Confirm that secure_file_priv=’/var/tmp’
2. mysql> DROP TABLE shop.customers;
3. shell> cp /backup/customers.MY* /var/lib/mysql/shop/
Which two actions are required to complete the restore? (Choose two.)
Answer options
- A. shell> cp /backup/customers.sdi /var/tmp
- B. shell> cp /backup/customers.sdi /var/lib/mysql/shop/
- C. mysql> SOURCE ‘/var/tmp/customers.sdi’
- D. mysql> IMPORT TABLE FROM /var/tmp/customers.sdi
- E. shell> cp /backup/customers.frm /var/lib/mysql/shop/
- F. mysql> IMPORT TABLE FROM /var/lib/mysql/shop/customers.sdi
- G. mysql> ALTER TABLE shop.customers IMPORT TABLESPACE
- H. mysql> ALTER TABLE shop.customers DISCARD TABLESPACE
Correct answer: D, G
Explanation
To successfully restore the MyISAM table, you must use 'mysql> ALTER TABLE shop.customers IMPORT TABLESPACE' to import the table structure and data from the external file. Additionally, 'mysql> IMPORT TABLE FROM /var/tmp/customers.sdi' is necessary to load the corresponding data into the table. The other options do not apply to this specific restoration process.