Vidyalelo
MySQL · Q570

MySQL

Programming · MySQL · question 570

Q570

What exports table definitions and contents?

A.
mysqldump
Answer
B.
mysqladmin
C.
mysqlimport
D.
mysqlexport

Answer: Option A

Solution

Answer: Option A
Solution:
This question asks about a command-line tool that is used to export data from a MySQL database. This means the tool takes data from your database and creates a file that can be saved and used to restore the data later.
Let's look at the options:
Option A: mysqldump
This is the correct answer! mysqldump is a powerful tool used to export database definitions (structure) and data. It creates a backup file in a format that can be easily imported back into MySQL.
Option B: mysqladmin
This tool is for administrative tasks like managing users, checking database status, and restarting the server. It's not specifically for exporting data.
Option C: mysqlimport
This tool is used to import data into a MySQL database. It's the opposite of exporting.
Option D: mysqlexport
This option is not a real MySQL command.
So the answer is Option A: mysqldump because it's the tool designed for exporting both the structure and content of your tables.