Bom dia, estou com alguns problemas envolvendo as consultas via MYSQL.
As informações estõa divergentes entre o resultado da query SQL via linha de comando e via client.
Ajustei as configurações do MYSQL no arquivo cnf, consultando via linha de comando ele traz o resultado esperado neste caso:
mysql> SHOW VARIABLES LIKE '%char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.01 sec)
mysql>
mysql> show variables like 'collation%';
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_unicode_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)
mysql>
Porém via MYSQL WORKBEN ou via DBeaver ele traz informações diferentes do esperado:
SHOW VARIABLES LIKE '%char%'
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database utf8
character_set_filesystem binary
character_set_results
character_set_server utf8
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/
show variables like 'collation%'
collation_connection utf8mb4_general_ci
collation_database utf8_unicode_ci
collation_server utf8_unicode_ci
O que pode estar ocasionando esta divergência?