Software, electronics and anything else

Zabbix – missing MySQL

Zabbix

I’ve been experimenting with Zabbix recently. Unfortunately, as with most things, just following the documentation to install it is a chore.

I ended up at the step where I need to import data into my new MySQL database:

ubuntu@host:~$ zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
gzip: /usr/share/doc/zabbix-server-mysql*/create.sql.gz: No such file or directory

Of course, it didn’t exist! Luckily, thanks to a post by a random user, I now knew that the issue was that Ubuntu – or, in my case, Oracle’s cloud image of it – had stripped the documentation directory!

The problem can be fixed by modifying the right file:

nano /etc/dpkg/dpkg.cfg.d/excludes

…and adding the following line about Zabbix:

#... except zabbix
path-include=/usr/share/doc/zabbix*

Re-install the zabbix packages, and you should now see the file needed to continue:

ubuntu@host:/usr/share/doc/zabbix-server-mysql$ ls
changelog.Debian.gz  copyright  create.sql.gz

3 thoughts on “Zabbix – missing MySQL

  1. Olá,
    estou com o mesmo problema, segui o seu passo a passo, porém mesmo após reinstalar, ainda não aparece o arquivo “create.sql.gz”.
    Sabe o que mais poderia fazer ?

    SO: ubuntu server 20.04
    zabbix: 5.4

    1. Not sure. Modifying the file and re-installing should work; if not, you likely have a different issue than what I had, and I can’t speculate on what that may be.

  2. thank you for your post man, solved!, just in my case in path /etc/dpkg there are 3 stuff: (file)dpkg.cfg (folder)dpkg.cfg.d (folder)origind
    I modify the first one exactly how you commented and later follow the steps again in zabbix page to reinstall system
    (Tried on Ubuntu 18 bionic)

Leave a Reply

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