当前位置:网站首页>mysql 字符集
mysql 字符集
2022-06-27 21:00:00 【dhjywe】
以下介绍mysql四个级别的字符集和比较规则
1.服务器级别
mysql> show variables like '%server';
+----------------------+-------------+
| Variable_name | Value |
+----------------------+-------------+
| character_set_server | utf8mb4 | 服务器字符集
| collation_server | utf8mb4_bin | 服务器比较规则
+----------------------+-------------+
2 rows in set (0.00 sec)
以上参数可以在运行时用set语句进行修改,也可以在配置文件进行配置
[server]
character_set_server=utf8mb4
collation_server=utf8mb4_bin
2.数据库级别
mysql> show variables like '%database';
+------------------------+-------------+
| Variable_name | Value |
+------------------------+-------------+
| character_set_database | utf8mb4 |
| collation_database | utf8mb4_bin |
| skip_show_database | OFF |
+------------------------+-------------+
3 rows in set (0.00 sec)
以上参数只能通过在创建数据库时指定,不能进行修改
3.表级别
表级别的字符集在创建表时没有制定就用所在库级别的字符集,如果有指定就用创建时的字符集,也可以后期修改表的字符集
alter table character set 字符集名称 collation 比较规则
4.列级别
同样在创建表时可已指定列的字符集,没有制定就用表的,同样可以进行后期修改
边栏推荐
- Windows环境下的ELK——Logstash+Mysql(4)
- 因美纳陷数据泄露“丑闻”:我国基因数据安全能交给美企吗?
- MySQL删除表后如何使ID从1开始
- 如何找到外文文献对应的中文文献?
- ClickOnce error deploying ClickOnce application - the reference in the manifest does not match the identity of the downloaded assembly
- Netease cloud lost its "feelings" card
- PE buys a underwear company
- How to start ID from 1 after MySQL deletes a table
- [can you really use es] Introduction to es Basics (II)
- Zabbix6.0 upgrade Guide - how to synchronize database upgrades?
猜你喜欢

Summary of solutions to cross system data consistency problems

捷码赋能案例:湖南天辰产研实力迅速提升!实战玩转智慧楼宇/工地等项目

云辅助隐私集合求交(Server-Aided PSI)协议介绍:学习

Senior headhunting team manager: interviewed 3000 consultants, summarized and organized 8 commonalities (Mao Sheng)

What problems should be paid attention to in the serpentine wiring of PCB?

Small chip chiplet Technology

"Top stream Aidou manufacturing machine" cooperates with four industrial capitals to become LP

This year's examinees are more "desperate" than the college entrance examination

seata

Prediction of benign / malignant breast tumors (logistic regression classifier)
随机推荐
ICML 2022: UFRGS |作为最优策略转移基础的乐观线性支持和后继特征
Stream + Nacos
Spatial relation query and graph based query in secondary development of ArcGIS Engine
The National University of Singapore 𞓜 uses model free reinforcement learning to evaluate the energy efficiency of the energy efficiency data center
How to start ID from 1 after MySQL deletes a table
图的存储结构
webService
[js]var, let,const 的区别
树莓派(以及各种派)使用指南
电子科大(申恒涛团队)&京东AI(梅涛团队)提出用于视频问答的结构化双流注意网络,性能SOTA!优于基于双视频表示的方法!
文献综述如何挑选文献进行阅读,比如我的检索结果有200多篇根本看不完,如何进行文献挑选呢?...
Stream + Nacos
What if Fiddler fails to listen to the interface
This year's examinees are more "desperate" than the college entrance examination
virtualbox扩展动态磁盘大小的坑
[js]var, let, const
Is the dog virtue training with a monthly salary of 30000 a good business?
Netease cloud lost its "feelings" card
Technical implementation process of easycvr platform routing log function [code attached]
[网络]常见的请求方法