Zabbix Database Schema Import Installation Inconsistencies

Has anyone successfully installed Zabbix and have it fully working? Its mostly broken if a person is following instructions from the Zabbix Website, or even from hundreds of other tutorials and even YouTube Videos!

Docker containers install but the local agent is broken and a whole lot of other things. Then there are base OS/no docker installs and the MySQL DB import schema is broken because the install packages do not include the file at this location:

/usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz,

Its just simply not there.

Zabbix and the Open Source Community have not updated the installation doc to reflect a CHANGE IN FILE STRUCTURE that Zabbix imposed. This is problematic for people new to Zabbix, but is a run-of-the-mill problem in this space.

The old file location:
/usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz

The NEW File Location:
/usr/share/zabbix-sql-scripts/mysql/server.sql.gz

Now, as part of the database install, this file imports the necessary tables for the DB to begin collecting data.

The correct command is as follows:

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql –default-character-set=utf8mb4 -uzabbix -p’zabbix’ zabbix

…as long as your DB user:zabbix and password:zabbix. Please change those variables according to your installation.

Take notice that the scripts are installed in the “share” directory and the “doc” directory is not in the new path. This is a very subtle difference that most “copy&paste” installers will certainly miss to no fault of their own.

This may seem trivial until one realizes that the old file structure still exists as part of the install and many websites still point to it.

The proper action to resolve the issue would be to alter the Zabbix Website Documentation, in addition to removing the old location that is installed by the packages.

Rant over: System up and running and monitoring servers!

Tech Enthusiast, Seasoned I/T Professional, United States Air Force Veteran

Leave a Reply

Your email address will not be published. Required fields are marked *