All Apps and Add-ons

Splunk MySQL Connector App charset problem

jcisha
Path Finder

Character display problem in question.



Splunk, MySQL, CentOS installed



@ MySQL My.cnf @



[mysql]

default-character-set = utf8

[mysqld]

character-set-client-handshake = FALSE

init_connect = "SET collation_connection = utf8_general_ci"

init_connect = "SET NAMES utf8"

default-character-set = utf8

character-set-server = utf8

collation-server = utf8_general_ci

[client]

default-character-set = utf8

[mysqldump]

default-character-set = utf8





@ Table Script @



CREATE TABLE test_table (

  code char (50) NOT NULL COMMENT 'CODE',

  name char (50) NOT NULL COMMENT 'NAME'

  PRIMARY KEY (code)

) ENGINE = InnoDB DEFAULT CHARSET = utf8;





@ Table Value @



code name

001 테스트



The value of the name field is "Korean".



@ Search Result @

| Mysqlquery spec = splunk_test query = "SELECT * FROM test_table;"



code name

"001" "???"





Are displayed as question marks.

Do you know how to solve the problem?

0 Karma

idaaa
Explorer

When you execute search at splunk web, try these search commands :

| Mysqlquery spec = splunk_test query = "SELECT code, cast(name as binary) FROM test_table;"
or
| Mysqlquery spec = splunk_test query = "SELECT code, convert(name using utf8) FROM test_table;"

Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!