berngp / docker-zabbix

Docker Container running a Zabbix Server and Zabbix Web UI.
Other
160 stars 66 forks source link

Invalid mysql database collation, expected utf8 #14

Closed sergio-bershadsky closed 9 years ago

sergio-bershadsky commented 9 years ago

Seems to be the aim is utf8 database, but some reason it is latin instead.

berngp commented 9 years ago

@nikitinsm just pushed a branch which forces the MySQL DB to UTF8. Need to test things out but feel free to give it a try.

sergio-bershadsky commented 9 years ago

It still latin1 fields caused of the mysql dump I think not my.ini config

for t in $(mysql --user=zabbix --password=zabbix  --database=zabbix -e "show tables";);do echo "Altering" $t;mysql --user=zabbix --password=zabbix --database=zabbix -e "ALTER TABLE $t CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;";done

This solves problem you can add it after db dump is fully loaded

berngp commented 9 years ago

Thanks Sergey, I'll follow you advice. Cheers

On Sat, Mar 14, 2015 at 11:44 PM, Sergey Nikitin notifications@github.com wrote:

It still latin1 fields caused of the mysql dump I think not my.ini config

for t in $(mysql --user=zabbix --password=zabbix --database=zabbix -e "show tables";);do echo "Altering" $t;mysql --user=zabbix --password=zabbix --database=zabbix -e "ALTER TABLE $t CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;";done

This solves problem you can add it after db dump is fully loaded

— Reply to this email directly or view it on GitHub https://github.com/berngp/docker-zabbix/issues/14#issuecomment-80880772.

sergio-bershadsky commented 9 years ago

BTW I have installed zabbix directly (without docker) from deb and DB is utf-8