MySQL Basics Practice Test: Database Copies — Flashcards | Databases | FatSkills

MySQL Basics Practice Test: Database Copies — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

Here are some steps to copy a MySQL database:
Create a new database using the CREATE DATABASE statement
Export all database objects and data using the mysqldump command
Import the SQL dump file into the new database using the mysql tool 

Here's an example of copying a database from one server to another:
On Server 1, run the following command: $> mysqldump --databases db1 > dump.sql
Copy the dump file from Server 1 to Server 2
On Server 2, run the following command: $> mysql < dump.sql 

You can also copy a MySQL table using dbForge Studio for MySQL. Here's how:
Right-click the table you want to copy in Database Explorer
Select Duplicate Object
In the dialog that opens, select the destination connection and database
Specify the name of the new table, and click OK
Select to copy the table data or structure only

1 of 7 Ready
The program that copies the databases from one server to another is ____________
mysqldbcopy
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password