相关疑难解决方法(0)

MySQL抛出错误的字符串值错误

我正在尝试将以下推文存储到longtext列/ utf8 charset/MySQL 5.5中.带有MyISAM存储的数据库.

我们也尝试过utf8mb4,utf16,utf32字符集,但无法解决这个问题.

tweet="@Dorable_Dimples: Okay enough of those #IfYouWereMines I'm getting dep
ressed. #foreveralone ?" lol yes

mysql> ALTER DATABASE foo CHARACTER SET utf8 COLLATE utf8_bin;

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 | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /rdsdbbin/mysql-5.5.12.R1/share/charsets/ | …
Run Code Online (Sandbox Code Playgroud)

mysql hibernate utf-8 utf8mb4

36
推荐指数
4
解决办法
4万
查看次数

标签 统计

hibernate ×1

mysql ×1

utf-8 ×1

utf8mb4 ×1