OK, that's quite "edgy" and I found quite a number of things, not sure if that should be split into multiple discussions, but here we are.
I am making a test scenario to install a MySQL 8 Replication cluster and run a Zabbix Server / Proxy against it. This should all be based on Debian.
The first thing to be noticed is that, I have a cluster separated, but while installing the zabbix-proxy-mysql in my test, he also installs a MariaDB along with the DEB package, which is quite forceful and in my opinion that should be avoided.
Second issue, is that the DEB package for zabbix-proxy-mysql, doesn't have a schema to create the zabbix-proxy database. (the one that should be in /usr/share/zabbix-proxy-mysql*/something.gz) There is no schema files that I could find.
So while trying to create the database according to the zabbix documentation I get:
( I found another ticket here https://support.zabbix.com/browse/ZBX-17207 which this command was really smooth )
I tried a few other variants but then anything really works, to I ignored the warning and tried to create the Tables like that.
Then grabbing the schema.sql file from the source, when I try to create the database on MySQL8 cluster, I get:
From the whole file I found the error line is:
Which is very odd.
Then I remember reading Vittorio Cioe (MySQL Senior Consultant) which explains on the presentation: https://assets.zabbix.com/files/zabbix_summit_2019/Vittorio_Cioe-Scaling_Zabbix_with_MySQL_InnoDB_Cluster.pdf on page 25, line in RED –
Primary key/unique non-null key is required on every table.
Therefore, changing the creation on that dbversion table to:
So in resume:
- DEB Package for proxy does not contain schema to create database;
- MySQL have troubles to set Characterset and Collate and give several warnings (which might be a problem in the future?)
- dbversion tables does not contain primary key, therefore have troubles with inserting data.