Database Restore Wizard (MySQL)

From RapidSQL
Jump to: navigation, search

Go Up to Database Recover/Restore

The MySQL Database Restore Wizard lets you build and submit a mysqlimport call, restoring a database from the data files generated by the Database Backup utility. For information on backing up a MySQL database, see Database Backup (MySQL).

To restore a MySQL database

  1. Connect to a MySQL datasource and ensure that it is the currently selected datasource. For details, see Connected/Selected Datasource options.
  2. Select Utilities > Database Restore to open the Database Import WIzard.
  3. Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
  4. Finally, use the Finish button to perform the restore.

Playback panel - Database Import Wizard

When restoring a MySQL database, this panel offers the following options:

Required Information Description

New Database Import Operation

This initiates the process of creating a new restore operation.

Enter the views SQL definition

If you want to replay a restore operation, when you select the radio button, the browse function is enabled so you can find the .DBImport file you want to reuse.

Target Database panel - Database Import Wizard

When restoring a MySQL database, this panel lets you specify the database to be restored.

To set the database that is to be restored

  • Select a database from the Please choose the target database list.

Select Data Files panel - Database Import Wizard

When restoring a MySQL database, this panel lets you build a list of dumped results files that are to be used to restore the database.

To set up a list of result files

  • Use the New button to add a new entry to the list, and then use the browse button to locate and select a results file.
  • Use the Delete button to remove a selected file from the list.
  • Use the arrow buttons to change the position of a selected file in the list.


Options panel - Database Import Wizard

When restoring up a MySQL database, this panel lets you set or select the mysqlimmport options dictating how the backup is to be performed.

Note: Before working with these options, consult MySQL documentation for information on the mysqlimport program. For more information, see Accessing Third Party Documentation.

The following table shows the Database Backup Wizard settings on this panel, their mysqldump option equivalents, and a description of their effect.

Wizard Option mysqldump Option Equivalent Description

Protocol

--protocol=

Select the communication protocol (TCP, SOCKET, PIPE, or MEMORY) to be used for communication between client and server.

Compress

--compress

Compresses all information sent between the client and server.

Delete Table Data

--delete

Empties the table before importing from the results file.

Force Continue

--force

Force the restore to continue even if SQL errors occur.

Lock Tables

--lock-tables

Locks all tables for writing before processing results files.

Input File Location

--local

Indicate whether the results file is on the server (SERVER) or client (LOCAL).

Ignore Header Rows

--ignore-lines=

Indicate the number of rows at the start of the file that are to be ignored.

Fields Terminated By, Fields Enclosed By, Fields Optionally Enclosed By, Fields Escaped By, and Lines Terminated By

Lets you provide --fields... and --lines--terminated-by option values for line and column separators.


Duplicate Key Options panel - Database Import Wizard

When restoring up a MySQL database, this panel lets you manage handling of input rows that duplicate existing rows on unique key values.

To specify duplicate row handling, select one of the following options

  • Select New Rows Replace Existing Rows (--replace equivalent)
  • Select Ignore Input Rows That Duplicate Existing Rows (--ignore equivalent)
  • Select Allow An Error To Occur When Duplicate Is Found And Ignore The Rest Of The Input File (equivalent to mysqlimport execution with neither --replace or --ignore options)

Summary panel - Database Import Wizard

When restoring up a MySQL database, this panel summarizes the choices you made in previous steps setting up the operation.