Error executing query in MySQL: Illegal mix of collations

0

In my environment:

  • Linux Debian 9.
  • mysql See 14.14 Distrib 5.6.41, for Linux (x86_64) using EditLine wrapper.

I'm getting the following error:

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'coalesce'

When executing the query show variables like 'char%'; in MySQL I have the following result:

character_set_client    utf8
character_set_connection    utf8
character_set_database  utf8
character_set_filesystem    binary
character_set_results   utf8
character_set_server    latin1
character_set_system    utf8
character_sets_dir  /usr/share/mysql/charsets/

Where it can be seen that the value of the variable character_set_server is latin1 .

And when I run the query show variables like 'collation%'; in MySQL I get the following result:

collation_connection    utf8_general_ci
collation_database  utf8_general_ci
collation_server    latin1_swedish_ci

Where it can be seen that the value of the variable collation_server is latin1_swedish_ci .

In the linux shell, such as ROOT, I ran the following command:

root@server:/#  mysqld --user=root --character-set-server=utf8   --collation-server=utf8_general_ci
2018-12-14 11:21:01 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-12-14 11:21:01 0 [Note] mysqld (mysqld 5.6.41) starting as process 4468 ...
Morto
root@server:/# 

Apparently it would have worked, but I was surprised by the word "Dead" and besides, the variables character_set_server and collation_server apparently did not change, that is, I execute the above queries again and the values continue respectively: latin1 e latin1_swedish_ci .

I need help to fix the variables and eliminate the reported error.

Thanks in advance!

    
asked by anonymous 14.12.2018 / 15:36

0 answers