Migration process for MySQL Server

Prerequisites

Source and target SQL Server instances must be installed. They may be hosted on different machines.

MySQL tools must be available on at least one of the computers (mysqldump and mysql client).

Useful links

http://dev.mysql.com/doc/refman/5.6/en/copying-databases.html

http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html

http://dev.mysql.com/doc/refman/5.6/en/mysql.html

Migration process

In the commands, configuration files or SQL statements below, please always replace:

SRCHOST with the address of the source database server

SRCROOTLOGIN with the source MySQL server root user login

SRCERADBNAME with the name of the source ERA database to back up

BACKUPFILE with the path to the file where the backup will be stored

TARGETHOST with the address of the target database server

TARGETROOTLOGIN with the target MySQL server root user login

TARGETERADBNAME with the name of the target ERA database (after migration)

TARGETERALOGIN with the login name for the new ERA database user on the target MySQL server

TARGETERAPASSWD with the password of the new ERA database user on the target MySQL server

It is not necessary to execute the SQL statements below via the command line. If there is GUI tool available, you can use an application you already know.

 

 

1.Stop the ERA Server/Proxy services.

2.Create a full database backup of the source ERA database (the database you plan to migrate):

mysqldump --host SRCHOST --disable-keys --extended-insert --routines -u SRCROOTLOGIN -p SRCERADBNAME > BACKUPFILE

3.Prepare an empty database on the target MySQL server:

mysql --host TARGETHOST -u TARGETROOTLOGIN -p "--execute=CREATE DATABASE TARGETERADBNAME /*!40100 DEFAULT CHARACTER SET utf8 */;"

validation-status-icon-infoNOTE: Use the apostrophe character ' instead of " quotation marks on Linux systems.

4.Restore the database on the target MySQL server to the previously prepared empty database:

mysql --host TARGETHOST -u TARGETROOTLOGIN -p TARGETERADBNAME < BACKUPFILE

5.Create an ERA database user on the target MySQL server:

mysql --host TARGETHOST -u TARGETROOTLOGIN -p "--execute=CREATE USER TARGETERALOGIN@'%' IDENTIFIED BY 'TARGETERAPASSWD';"

Recommended characters for TARGETERALOGIN:

Small ASCII letters, numbers and underscore "_"

Recommended characters for TARGETERAPASSWD:

ASCII characters only, including large and small ASCII letters, numbers, spaces and special characters

Do not use non-ASCII characters, curly braces {} or @

Please note that if you do not follow the character recommendations above, you may have database connectivity problems or you will need to escape the special characters in the later steps during database connection string modification. Character escaping rules are not included in this document.

6.Grant proper access rights for the ERA database user on the target MySQL server:

mysql --host TARGETHOST -u TARGETROOTLOGIN -p "--execute=GRANT ALL ON TARGETERADBNAME.* TO TARGETERALOGIN;"

validation-status-icon-infoNOTE: Use the apostrophe character ' instead of " quotation marks on Linux systems.

7.Find startupconfiguration.ini on the machine where ERA Server/Proxy is installed.

oFor Windows Vista and later:

% PROGRAMDATA %\ESET\RemoteAdministrator\Server\EraServerApplicationData\Configuration\startupconfiguration.ini

oFor earlier Windows versions:

% ALLUSERSPROFILE %\ Application Data\ESET\RemoteAdministrator\Server\EraServerApplicationData\Configuration\startupconfiguration.ini

oFor Linux:

/etc/opt/eset/RemoteAdministrator/Server/StartupConfiguration.ini

8.Change the database connection string in ERA Server/Proxy startupconfiguration.ini

oSet the address and port of the new database server

oSet the user name and password

oThe final result should look like:

DatabaseType=MySqlOdbc
DatabaseConnectionString=Driver=MySQL ODBC 5.3 Unicode Driver;Server=TARGETHOST;Port=3306;User=TARGETERALOGIN;
Password={TARGETERAPASSWD};CharSet=utf8;Database=TARGETERADBNAME;

9.Start the ERA Server/Proxy and verify that the ERA Server/Proxy service is running correctly.