不能在docker容器中写一些特殊字符,例如'á''ñ'mysql服务器
这些是字符集
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/
当我尝试在终端中复制并粘贴“Amélie”时,实际输出为“ Amlie”
答案 0 :(得分:1)
设置表甚至列的默认字符集
CREATE TABLE t1 (
col1 varCHAR(10) ,
col2 varCHAR(10)
) DEFAULT CHARSET=utf8;
INSERT INTO t1
(`col1`, `col2`)
VALUES
('Amélie','Amélie');
进入
Select * From t1;
col1 col2
Amélie Amélie