我尝试保存/选择俄文文本时出现MySql错误

时间:2016-10-06 06:54:21

标签: mysql ubuntu utf-8

我在ubuntu 16上有mySql服务器。当我在西里尔语中尝试保存txt时出错我有错误

java.sql.SQLException: Incorrect string value: '\xD0\xBA\xD1\x83\xD0\xBF...' for column 'description' at row 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963) ~[mysql-connector-java-5.1.39.jar:5.1.39]
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966) ~[mysql-connector-java-5.1.39.jar:5.1.39]

当我运行mysql> show variables like 'char%'时,我得到了这个

    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.00 sec)

我有这个配置[mysqld]

skip-character-set-client-handshake
character-set-server = utf8
init-connect='SET NAMES utf8'
collation-server=utf8_general_ci

0 个答案:

没有答案