MySQL/MariaDB and Zabbix: the connection, a separate database server and PostgreSQL
Sign in to read this lesson
In Zabbix everything goes through the database. In this lesson we learn how the server and the web interface connect to the database, how to move the database to a separate server, how to tune MariaDB for Zabbix, how to take a backup and how to do the same installation with PostgreSQL.
What you will learn
- Two sides connect to the database: the Zabbix server (
/etc/zabbix/zabbix_server.conf, theDB*parameters) and the web interface (/etc/zabbix/web/zabbix.conf.php). When the password changes, both must be updated. - If the database is on a separate server:
bind-addressin MariaDB, the user'zabbix'@'10.10.10.20', port 3306 in the firewall only for the Zabbix server; on the Zabbix sideDBHost. innodb_buffer_pool_sizeis the most important database setting: about half of the RAM set aside for the database.- Backup:
mysqldump --single-transaction zabbix | gzip, plus the/etc/zabbixdirectory. - The PostgreSQL variant:
zabbix-server-pgsql,php8.3-pgsql,createuser --pwprompt zabbix,createdb -O zabbix zabbix, schemasql-scripts/postgresql/server.sql.gz.
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.