Err: The frontend does not match Zabbix database. Current database version (mandatory/optional): 3040000/4000003. Required mandatory version: 4000000. Contact your system administrator.

When updating Zabbix from version 3.4 to version 4.0, I saw this on the Zabbix web page:

zabbix-error.png

Database error
The frontend does not match Zabbix database. Current database version (mandatory/optional): 3040000/4000003. Required mandatory version: 4000000. Contact your system administrator.

The solution is, login to database and run:

mysql> use zabbix;
mysql> update dbversion set mandatory=4000000;
mysql> flush privileges;

See: https://blog.whsir.com/post-2357.html