3.Install HotDB

3.1 Modify IP address of MySQL

From left to the right we can see: IP, port and database name. And you can only change the IP part.

INCORRECT IP ADDRESS WILL LEAD TO FAILURE OF HOTDB INSTALLATION.

3.2 Install HotDB

sh install_hotdb_for_zabbix.sh

Enter two then choose your Zabbix version ( Default: v3.2 )

If there's already a MySQL process that port is 3306,then you need to choose whether you want to use it as a repository.

There a logic database called Zabbix in HotDB for Zabbix, which can provide centralized database experience under distributed database environment. You need to choose whether to initialize it or you can create one by yourself.

If you choose n, you will need to import Zabbix initial table and data, or migrate existed data in Zabbix database by yourself.

3.3 Judgement of successful installation

a. Check port 3323

netstat -tnlp | grep 3323

b. Log in

mysql -uroot -proot -P3323 -h127.0.0.1

3.4 HotDB Management (Web)

You can visit website to manage HotDB : http://192.168.220.104:3324 （IP address here is HotDB's IP and we don't have English version）

Both username and password are "admin". Please use chrome or firefox.

HotDB for Zabbix has divided all the tables Zabbix used into 4 pieces, which we called datanode.

You can find all the tables here. MySQL databases are under datanodes. And you can install two MySQL databases under one datanode to keep high availability.You can set master-slave relationship in failover setting (the tab after datasource/MySQL database setting).

After you changed things in management, you need to press dynamic loading button to load information at HotDB-server.

Zabbix Data Migration

1. Statement

When exporting data from Zabbix, it is not recommended to modify Zabbix’s configuration, template, and so on. If you want data from migration process to be retained in the new environment, then you need to open binlog in Zabbix’s MySQL server, whose format is STATEMENT or MIXED (MIXED requires the database isolation level to be REPEATABLE-READ). After data import is complete, you need to perform optional data catch up steps.

As Zabbix use foreign key, and HotDB for Zabbix has not yet fully supported foreign key. To avoid such error while importing data, mysqldump order will be executed in several times, so the data is not derived in one transaction. Therefore, if there is an error about foreign key, you can ignore it or restart exporting data, you can also stop Zabbix service to export data. You may also notice that there will be a primary key conflict when catching up data, which also caused by data not derived in a transaction reasons, which can also be ignored.

2. Data Export

This section explains situation when Zabbix database use MySQL 5.6, any other MySQL version may require more or less necessary parameters when using the mysqldump command in the script.

Find script in hotdb-server/conf/tool,execute it and you will see parameters required: