Icinga / icinga-kubernetes

GNU Affero General Public License v3.0
5 stars 1 forks source link

COLLATION 'utf8mb4_unicode_ci' is not valid for CHARACTER SET 'binary' #98

Open razvanmac95 opened 1 month ago

razvanmac95 commented 1 month ago

Hi,

I receive this error after I migrate my icinga-kubernetes setup:

'I0604 06:01:56.441502 1 database.go:285] "Connecting to database" logger="database" I0604 06:01:56.442912 1 driver.go:43] "Can't connect to database. Retrying" logger="database" error="dial tcp 192.168.144.2:3306: connect: connection refused" I0604 06:01:56.942782 1 driver.go:48] "Reconnected to database" logger="database" I0604 06:01:56.946611 1 main.go:75] "Importing schema" logger="database" F0604 06:02:08.792389 1 main.go:80] Error 1253 (42000): COLLATION 'utf8mb4_unicode_ci' is not valid for CHARACTER SET 'binary''

lippserd commented 1 month ago

Hi @razvanmac95,

That sounds strange. What did you exactly in order to migrate your setup?

Best regards, Eric

razvanmac95 commented 1 month ago

Hi @lippserd,

I have an docker-compose with all setup and for the database I run:

CREATE DATABASE IF NOT EXISTS kubernetes; CREATE USER IF NOT EXISTS 'kubernetes'@'%' IDENTIFIED BY 'xxxxxxxx'; GRANT ALL ON kubernetes.* TO 'kubernetes'@'%';

Thanks, Razvan M.

lippserd commented 1 month ago

I see. We have made a lot of changes to the schema and there is no automatic migration yet. Please DROP the Kubernetes database once and restart the daemon.