Home » Oracle » 1z0-883 » Which two commands will restore the sakila database without interfering with other running database?
Mysqldump was used to create a single schema backup;
Shell> mysqldump -u root -p sakila > sakila2013.sql
Which two commands will restore the sakila database without interfering with other running database?
A. Mysql> USE sakila; LOAD DATA INFILE ‘sakila2013.sql’;
B. Shell> mysql -u root -p sakila <sakila2013.sql
C. Shell> mysqlimport -u root -p sakila sakila2013.sql
D. Shell> mysql -u root -p -e ‘use sakila; source sakila2013.sql’
E. Shell> mysql -u root -p -silent < sakila2013.sql
Correct Answer: BD
Explanation/Reference:
C: If you need to restore a database that already exists, you’ll need to use mysqlimport command. The syntax for mysqlimport is as follows:
mysqlimport -u [uname] -p[pass] [dbname] [backupfile.sql]
E: Basic syntax to restore:
mysql -u root -p[root_password] [database_name] < dumpfilename.sql
Reference: How to Back Up and Restore a MySQL Database
Download Printable PDF. VALID exam to help you PASS.
|
|