Notice In CDP, end-user level MySQL backup is not supported. Only super-users can fulfill MySQL backup. Sub-users are limited by agent user permission. |
If you have the Databases Add-On enabled for Agent, you need to allow the CDP Server to see the MySQL database in the client. This can be done by entering the information about the database to the Policy. Follow the instructions below in your CDP Enterprise or Advanced Edition.
Note To add a MySQL instance to your Agent, you will need to install a database driver first. See here for detailed instructions. |
1. Select the "Databases" tab in the Policy properties window. You can do so while creating a new Policy as shown below.
You can also select the "Databases" tab in the "Edit Policy" window after the Policy has been saved and even run. See Editing Policies.
2. On the "Databases" tab of the 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 can enable or disable the database instance.
5. The following wizard screen is "Host." Here you can enter the information about host to connect to.
- Use Alternate Host Name/IP - You can check this option when you need to configure multiple network interfaces situated on one host, but having different IP addresses. By default, the agent's current hostname is used. This option can no longer be used to connect to MySQL databases, located on another host.
Notice The "Use Alternate Host Name/IP" option is used when:
Or
|
Notice The "Use Alternate Host Name/IP" option is not used to connect to another host. |
- Host Name/IP - Specify hostname or IP address if it differs from the agent's current hostname/IP.
- Port Number - By default, "3306" port number is used. If you use another port number to connect to the database in your environment, specify the port number in this field.
6. On the "Authentication" screen you must specify the authentication credentials to connect to the database instance.
- Username - Enter the name of the user who has full administrator-level access to the database instance you want to back up.
Note
You do not need to specially create a user and allow remote connections to MySQL Instance. While adding a MySQL Instance to the Policy, you can use the credentials of any MySQL user with full access to MySQL server from localhost. For example, you can use MySQL 'root@localhost' account typically created during MySQL server installation. - Password - Enter the password of the user who has full access to the databases you want to back up.
- Confirm Password
7. On the "Data Directory" screen, optionally define the path of data directory. By default, the application discovers where the database stores its data files. In some environments, the data directory is under a different path than the discovered path. For these cases, you can specify the exact path to the database's data directory to compensate.
For example, if the MySQL instance is relative to the Virtual Machine root directory, you need to specify the full path to your MySQL data directory: /vz/customer1/var/mysql/data/dir (Virtuozzo.)
8. On the following 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 filesystem 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 choose to get MySQL table statistics.
Note Receiving the statistics may slow down the replication process. |
To set up a MySQL database in a Virtuozzo container, you will need to specify the following:
- Host - Use Alternate Host Name/IP must be checked with hostname/IP and port details added.
- Authentication - Username and password for the MySQL instance.
- Options - Specify a Virtuozzo container ID must be checked and the container ID added below.
10. On the last "Summary" screen, the settings you have selected are listed.
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 "Databases" tab of the Policy window. Instance options are displayed in the appropriate columns.
The following actions over the MySQL Instance are available via the icons:
- Edit - Opens the "Add Database Instance" wizard where you can change the instance settings.
- Delete - Removes the instance without prompting to confirm.
- Test Connections - Attempts to connect to the database at the specified host and port using the provided authentication credentials. Optionally performs Flush and Lock check.
- Disable - Disables the MySQL instance. A disabled instance retains its configuration, but will not be backed up when the Policy executes.
13. Now save the Policy.