Adding a MySQL Instance to a Policy

Notice
In CDP, end-user-level MySQL backup is not supported. Only super-users can make a MySQL backup. Sub-users are limited by Agent user permissions.

If you have the Databases Add-On enabled for an Agent, you need to allow the CDP Server to see the MySQL database in the client. This can be done by entering information about the database in the Policy. Follow the instructions below in your CDP Enterprise or Advanced Edition.

Note
To add a MySQL Instance to your Agent, you will first need to install the MySQL database driver. Go here for detailed instructions.

1. Select the "MySQL" tab in the Policy window. You can do this while creating a new Policy as shown below.

You can also select the "MySQL" tab in the "Edit Policy" window after the Policy has been saved, and even while it is running. See Editing Policies.

2. On the "MySQL" tab of the "Edit Policy" window, click on the "Add New MySQL Instance" button.

3. The "Add Database Instance" wizard window will appear. Familiarize yourself with the introductory information, and click "Next" to proceed with adding the Instance.

If you see the following error message, then the database driver is not installed on your Agent.

See this chapter for detailed instructions on how to install the driver.

4. On the following "Name" screen, you can define the name for your database and enable or disable the database Instance.

5. The next wizard screen is "Host." Here you can enter the information about the host to connect to. By default, the Agent's current host name is used.

Notice
The "Use Alternate Host Name/IP" option is used in the following cases:
  • Multiple network interfaces are configured on the host, each with a different IP address configured for connection. Example: eth1

Or

  • When you have configured multiple IP addresses over the same network interface. Example: eth0:1 (Aliasing).
    The "Use Alternate Host Name/IP" option is not used to connect to another host.

6. On the "Authentication" screen, you must specify the authentication credentials to connect to the database Instance.

7. On the "Data Directory" screen, you can optionally define the path of the data directory. By default, the application discovers where the database stores its data files. In some environments, the data directory is located under a different path than the discovered path. For these cases, you can specify the exact path to the database's data directory.

In order to properly restore the MySQL container, add the path of the MySQL container, e.g., /var/lib/mysql.

Note
Do not use the PVC Hardware Node’s path.

8. On the next screen, specify a base directory to use (if it differs from the standard directory). By default, the system attempts to automatically determine where on the file system the necessary program files are located. In some environments, the automatic method fails. To remedy this, you can choose to specify the exact path for the base directory. This will ensure that the system can locate the necessary files.

9. On the "Options" screen, you can "Specify a Virtuozzo Container ID" and "Get MySQL table statistics."

Note
Receiving MySQL table statistics may slow down the replication process.

To set up a MySQL database on a PVC container, you will need to specify the following:

Read more in Adding a MySQL Instance to a Policy on a PVC Container.

10. On the last "Summary" screen, the settings you have selected are displayed.

Once you have verified that the specified settings are correct, click "Add" to add your MySQL Instance to the Policy.

11. The wizard screen closes, and the added MySQL Instance appears on the "MySQL" tab of the "Create New Policy" window. Instance options are displayed in the appropriate columns.

It is possible to apply the following actions to the MySQL Instance via the corresponding icons:

13. Save the Policy.