Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
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.
–
I found https://github.com/zabbix/zabbix-docker/issues/13 and so deduced that it is a problem about the MySQL Database collation (and this matches the warning ** Database 'zabbix' already exists. Please be careful with database COLLATE!
)
I solve the problem by re-creating the MySQL database with
charset: utf8
collation: utf8_bin
–
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.