I am deploying a zabbix-server. I created a MySQL database on the a cloud platform. When I start the zabbix-server-mysql:alpine-5.2-latest
container which connects to this DB, it automatically exits after a while. The log shows:
* Preparing Zabbix server
** Using MYSQL_USER variable from ENV
** Using MYSQL_PASSWORD variable from ENV
********************
* DB_SERVER_HOST: xxxxx
* DB_SERVER_PORT: 3306
* DB_SERVER_DBNAME: zabbix
********************
** Database 'zabbix' already exists. Please be careful with database COLLATE!
** Creating 'zabbix' schema in MySQL
ERROR 1071 (42000) at line 357: Specified key was too long; max key length is 3072 bytes
** Preparing Zabbix server configuration file
** Updating '/etc/zabbix/zabbix_server.conf' parameter "ListenPort": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "SourceIP": ''...removed
...
** Updating '/etc/zabbix/zabbix_server.conf' parameter "TLSPSKIdentity": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "TLSPSKFile": ''...removed
** Updating '/etc/zabbix/zabbix_server.conf' parameter "User": 'zabbix'...updated
Starting Zabbix Server. Zabbix 5.2.3 (revision ae46273).
Press Ctrl+C to exit.
8:20210125:093824.714 Starting Zabbix Server. Zabbix 5.2.3 (revision ae46273).
8:20210125:093824.714 ****** Enabled features ******
8:20210125:093824.714 SNMP monitoring: YES
8:20210125:093824.714 IPMI monitoring: YES
8:20210125:093824.714 Web monitoring: YES
8:20210125:093824.714 VMware monitoring: YES
8:20210125:093824.714 SMTP authentication: YES
8:20210125:093824.714 ODBC: YES
8:20210125:093824.714 SSH support: YES
8:20210125:093824.714 IPv6 support: YES
8:20210125:093824.714 TLS support: YES
8:20210125:093824.714 ******************************
8:20210125:093824.714 using configuration file: /etc/zabbix/zabbix_server.conf
8:20210125:093824.946 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
It can connect to MySQL and create some tables including the users
table.
When I restart the container, the same error shows up again.
question from:
https://stackoverflow.com/questions/65895096/cannot-start-docker-image-of-zabbix-server-mysql-cannot-use-database-zabbix 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…