Question 1
You are requested to export data from a set of the following tables in the database ‘world_x’.
Tables (country, countryinfo, location)
Which two options would allow you to export data as files?
using MySQL Client and the - -dump option to dump the tables to files:
# mysql –u<user> -p –h<host> -P<port> -- dump world_x.country world_x.countryinfo world_x.location
using MySQL Client and EXPORT <table> TO <file> to export data one by one:
mysql>EXPORT world_x.country TO ‘/output/country.txt’;
mysql>EXPORT world_x.countryinfo TO ‘/output/countryinfo.txt’;
mysql>EXPORT world_x.location TO ‘/output/location.txt’;
using MySQL Client and SELECT …INTO OUTFILE ‘<filename>’ from <TABLE> to export data one by one:
mysql>select * into outfile ‘/output/country.txt’ from world_x.country;
mysql>select * into outfile ‘/output/countryinfo.txt’ from world_x.countryinfo;
mysql>select * into outfile ‘/output/location.txt’ from world_x.location;
using mysqlexport to export multiple tables in a database in one command line:
# mysqlexport –u<user>- h<host> -P<port> -p world_x country countryinfo location> mydump.sql
using mysqldump to dump multiple tables in a database in one command line:
# mysqldump –u<user>- h<host> -P<port> -p world_x country countryinfo location> mydump.sql
Correct answer: CE