nerdexam
Oracle

1Z0-888 · Question #33

You created a backup of the world database with this command: shell> mysqldump --opt world > dump.sql Which two will import the data from dump.sql?

The correct answer is C. shell> mysqlimport test dump.sql D. mysql> USE test; mysql> LOAD DATA INFILE 'dump.sql'. The stated correct answers of C and D are actually incorrect - this appears to be an error in the answer key. The true correct answers are B and E. Why B and E are correct: B (mysql test < dump.sql) works because mysqldump produces a plain SQL script, and the mysql client can…

Backup and Recovery

Question

You created a backup of the world database with this command: shell> mysqldump --opt world > dump.sql Which two will import the data from dump.sql?

Options

  • Ashell> mysqladmin recover test dump.sql
  • Bshell> mysql test < dump.sql
  • Cshell> mysqlimport test dump.sql
  • Dmysql> USE test; mysql> LOAD DATA INFILE 'dump.sql';
  • Emysql>USE test; mysql>SOURCE dump.sql;

How the community answered

(33 responses)
  • A
    12% (4)
  • B
    3% (1)
  • C
    79% (26)
  • E
    6% (2)

Explanation

The stated correct answers of C and D are actually incorrect - this appears to be an error in the answer key. The true correct answers are B and E.

Why B and E are correct:

  • B (mysql test < dump.sql) works because mysqldump produces a plain SQL script, and the mysql client can execute it via shell redirection - this is the standard restore method.
  • E (SOURCE dump.sql) works for the same reason: the MySQL client's SOURCE command reads and executes SQL statements from a file line by line.

Why the others are wrong:

  • A - mysqladmin has no recover command; it handles server administration tasks like status checks and shutdown, not data import.
  • C - mysqlimport is for importing delimited text files (CSV/TSV), where the filename must match the target table name. It cannot parse a SQL dump script.
  • D - LOAD DATA INFILE also imports delimited text data, not SQL statements. It expects rows of column-separated values, not CREATE TABLE/INSERT syntax.

Memory tip: mysqldump produces SQL code, so you restore it with tools that run SQL - the mysql client (via < redirect or SOURCE). Tools like mysqlimport and LOAD DATA INFILE are for structured text data, not SQL scripts. Think: dump = SQL script = needs SQL executor.

Topics

#backup restore#data import#mysqlimport#LOAD DATA INFILE

Community Discussion

No community discussion yet for this question.

Full 1Z0-888 Practice