通过MySQL命令行修改:
mysql> set character_set_client=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_connection=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_database=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_results=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_server=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_system=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_connection=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_database=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_server=utf8;
Query OK, 0 rows affected (0.01 sec)
查看:
mysql> show variables like ‘character_set_%‘;
+--------------------------+----------------------------+
| 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.03 sec)
mysql> show variables like ‘collation_%‘;
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.04 sec)
相关文章
- 08-26ascii - 在八进制,十进制,十六进制中的 ASCII 字符集编码
- 08-26python requests接收chunked编码问题-python源码修改
- 08-26Notepad++ 批量修改文件编码格式
- 08-26csv文件修改编码格式
- 08-26项目编码格式修改,将项目中的GBK文件改为UTF-8文件
- 08-26修改字符集为utf8mb4;阿里的记录信息
- 08-26深度学习04-keras实例iris数据集+模型保存调用及修改+在sklearn框架内使用Keras模型+交叉验证
- 08-2664位编译器下,将指针转换成UINT32,不需要修改编译选项的编码方式
- 08-26IDA硬编码修改SO,重新打包APK绕过FRIDA反调试
- 08-26VCODE修改控制台编码格式解决输出乱码问题