zoukankan      html  css  js  c++  java
  • ERROR 1366 (HY000): Incorrect string value:MySQL数据库、表的字符集为GBK

    mysql> update userinfo set MEDIASOURCE = 'CS02-北京' where IMPORTNO = 'IMP201640613101206';
    ERROR 1366 (HY000): Incorrect string value: 'x91' for column 'MEDIASOURCE' at row 1

    mysql> show variables like '%char%';
    +--------------------------+----------------------------+
    | Variable_name | Value |
    +--------------------------+----------------------------+
    | character_set_client | gbk |
    | character_set_connection | gbk |
    | character_set_database | gbk |
    | character_set_filesystem | binary |
    | character_set_results | gbk |
    | character_set_server | gbk |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    8 rows in set (0.00 sec)

    mysql> set character_set_client =utf8;
    Query OK, 0 rows affected (0.00 sec)

    mysql> set character_set_server =utf8;
    Query OK, 0 rows affected (0.00 sec)

    mysql> show variables like '%char%';
    +--------------------------+----------------------------+
    | Variable_name | Value |
    +--------------------------+----------------------------+
    | character_set_client | utf8 |
    | character_set_connection | gbk |
    | character_set_database | gbk |
    | character_set_filesystem | binary |
    | character_set_results | gbk |
    | character_set_server | utf8 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    8 rows in set (0.00 sec)

    mysql> update userinfo set MEDIASOURCE = 'CS02-北京' where IMPORTNO = 'IMP201640613101206';
    Query OK, 169 rows affected (0.03 sec)
    Rows matched: 169 Changed: 169 Warnings: 0

  • 相关阅读:
    MySQLHA系列MHA(一)
    VS找不到约束
    Android开发被添加到桌面快捷方式
    Oracle查看和修改其最大的游标数
    Sde表结构分析
    SDE+ORACLE优化配置
    sqlplus常用命令
    ArcGIS 开发的一些知识学习点
    1.ireport基本使用
    java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes
  • 原文地址:https://www.cnblogs.com/elontian/p/9185309.html
Copyright © 2011-2022 走看看