Migrate an External MySQL Database

In this section:

Overview

Migrating an external MySQL database from one host to another can be accomplished using the mysqldump utility distributed with MySQL. This article outlines the usage of this tool for migrating the EchoSystem Server (ESS) database. For detailed information on this utility, as well as information on using it to migrate a database between different MySQL versions, see the documentation on the MySQL website for the appropriate MySQL version.

Before You Begin

Ensure that you are using a supported version of MySQL. Be advised also that database clustering is not supported. See Supported Technologies.

Solution

The path to the mysqldump utility depends on the operating system version. This command should only be executed when  a short downtime can be tolerated for the ESS. Once the utility is located, execute the following command to dump the database to a text file containing SQL commands which will recreate the tables and data:

mysqldump -u [username] -p -B [database_name] > ess_db_backup.sql

This command creates a text file, ess_db_backup.sql, in the current working directory. The username parameter specifies the MySQL account, which should be used to access the database, while the database_nameparameter specifies the database upon which to operate. Consult your installation notes for these parameters. Copy this file to the location of the new MySQL database, then run the following command to recreate the database.

mysql -u [username] -p < ess_db_backup.sql > output.tab

Examine the file output.tab for any errors.