If you have the MySQL Add-On enabled, you need to allow the CDP Server to see the MySQL database in the client. Follow the instructions below to add and configure a MySQL instance in your CDP Server Stand Alone or Data Center.
All of your MySQL databases will get backed up on the physical server. There is no limit to the number of MySQL instances you can back up on one physical server.
1. Log in to your CDP Server interface.
2. Next, click on the "Hosts" tab.
The "Hosts" page typically loads automatically after you log in.
3. When the page has loaded, click on the Host name or the IP address of the Host associated with the MySQL database you want to backup. Alternatively, you can click on the "Open" link.
|New Feature in Version 2|
To find a Host, you can use the Host List Filter
4. When the page has loaded, click on the "MySQL" tab. On the displayed page you can configure a new MySQL server instance to be backed up.
9. Enter a Description of the server and a Username/Password combination to connect to the MySQL server. Choose a protocol to use.
Below is a full list of options to define:
- Username - Enter the name of the user who has full root permissions to the databases you want to back up.
- Password - Enter the password of the user who has full access to the databases you want to back up.
- Connection Type - You can select the protocol which the Agent will use to communicate with the MySQL server.
- Host /IP - You can configure the Agent to connect to the MySQL server via TCP/IP. In this case you can set the Agent backup databases from a remote MySQL server. To connect to MySQL server via TCP/IP, you should provide the IP address of the MySQL server and the TCP port. MySQL usually listens on port 3306 (which is accessed by default).
- Socket File - If the MySQL server runs on the same machine as the Agent, it is better to select Socket File because data exchange via Unix domain socket is performed 20-30% faster than via TCP/IP. If you choose to use the socket file option, you will need to enter the full path to the socket file. On Fedora and CentOS the full path usually is /var/lib/mysql/mysql.sock. If you are not sure, check the socket = parameter in the /etc/my.cnf file.
- Host - Enter if you have selected the "Host /IP" connection type.
- Port - Enter if you have selected the "Host /IP" connection type. "3306" is a default port.
- Socket File - Enter if you have selected the "Socket File" connection type.
If you do not know the "Host", "Port", or "Socket File", you can find this data in the my.cnf file that is usually located in /etc/mysql/.
Below is a configuration of the local MySQL server accessed via the Socket File.
10. Define the advanced MySQL instance options that apply:
- Use custom MySQL data directory path - Normally the CDP Server asks MySQL where the data directory is located. But if the MySQL instance is relative to the Virtual Machine root directory, you need to specify the full path to your MySQL data directory. Example: /vz/customer1/var/mysql/data/dir (for Virtuozzo.)
- Use custom InnoDB data directory path - If you locate the InnoDB tablespace files in a location other than the MySQL server data directory, then specify this custom location.
- Use custom InnoDB log directory path - If you locate the InnoDB log files (i.e. ib_logfile0, etc.) not in the default location, then specify this custom location.
11. Once you have configured the appropriate settings above based on your specific needs, click "Add" to add your MySQL database.
12. The CDP Server should connect to your MySQL database. If the MySQL instance has been found, then its properties are displayed on the screen.
13. Add a MySQL instance for each MySQL running on your server or VPSs. All added MySQL instances of the Host are listed in the left pane under the Host name.
14. Follow the standard procedures for backing up a Host. Refer to Scheduling MySQL Backup for further instructions.
15. After after the first backup you will be able to browse your MySQL tables and choose which you would like to restore.