Upgrading Zabbix from Version 5.0 to 6.0: Comprehensive Migration Guide
Currrent Environment Overview
Our monitoring infrastructure consists of a central Zabbix server with multiple distributed proxies. The specific configuration details are as follows:
- Zabbix Server: Source installation, version 5.0.12, MySQL 5.7 (source installation)
- Zabbix Proxies: Installed via Yum, version 5.0.12, MySQL 5.7 (source installation)
Migration Strategy
The migration approach preserves the Zabbix server database while resetting the proxy databases. The high-level migration sequence involves:
- Install MySQL 8.0.32 on both Zabbix server and proxy systems
- Export the Zabbix server database using mysqldump and import it into the new MySQL 8.0.32 instance
- Configure database replication between the original and new server databases
- Install Zabbix server 6.0.21 with proper database connection configuration
- Initialize proxy databases by installing Zabbix proxy 6.0.21 and configuring database connections
- Restart both Zabbix server and proxy services
- Upgrade all Zabbix agents to the latest compatible version
Critical Configuration Notes
MySQL User Authentication
When creating the Zabbix user in MySQL 8.0, the authentication method must be explicitly set:
mysql> ALTER USER 'zabbix'@'localhost' IDENTIFIED WITH mysql_native_password BY 'zabbix';
Database Trust Configuration
Before starting the Zabbix server, the database parameter for function creators must be enabled:
mysql> SET GLOBAL log_bin_trust_function_creators = 1;
If upgrade failures occur, execute this command and restart the server. After successful upgrade, revert the setting:
mysql> SET GLOBAL log_bin_trust_function_creators = 0;
Proxy Database Schema
The schema.sql file required for proxy database initialization is located in the source package at database/mysql within the zabbix-6.0.21.tar.gz archive.
Web Interface Update
The Zabbix UI components are found in the ui directory of the zabbix-6.0.21.tar.gz source package. The UI must be updated alongside the server components, as failure to do so may result in incomplete functionality (such as missing alert displays).
Post-Upgrade Configuration
After updating the Zabbix UI, refresh the web interface. The system will present configuration prompts that should be followed sequentially to complete the migrasion.
Post-Migration Considerations
- Verify the status of all monitored hosts to ensure proper functionality
- Confirm that the PHP version meets Zabbix 6.0 requirements before initiating the upgrade
- Evaluate whether the new features in Zabbix 6.0 justify the migration effort for your specific use case
Additional Resources
- Database creation documentation
- Source code upgrade procedures