惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
Attack and Defense Labs
Attack and Defense Labs
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Full Disclosure
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
V2EX - 技术
V2EX - 技术
B
Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
M
MIT News - Artificial intelligence
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
W
WeLiveSecurity
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
T
Threatpost
小众软件
小众软件
T
The Blog of Author Tim Ferriss
Google Online Security Blog
Google Online Security Blog
MongoDB | Blog
MongoDB | Blog
T
Tenable Blog
P
Privacy International News Feed
S
Security @ Cisco Blogs
H
Heimdal Security Blog
大猫的无限游戏
大猫的无限游戏
B
Blog RSS Feed
H
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Proofpoint News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
O
OpenAI News
Security Latest
Security Latest
S
Securelist
Cyberwarzone
Cyberwarzone
D
Docker
S
Schneier on Security
V
Vulnerabilities – Threatpost
The GitHub Blog
The GitHub Blog
P
Privacy & Cybersecurity Law Blog
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - coffee

apache配置http跳转https centos7使用yum安装mysql5.7 Jboot实现Redis操作事件通知 sun.misc.BASE64Encoder找不到jar包的解决方法 使用命令修改git的用户名和提交的邮箱 apache,请求来源特定域名,重定向到图片域名。 使用cron+php脚本监控后台任务脚本 Shell_exec php with nohup git常用命令 Jenkins+Gitee异常解决 kafka安装和简单测试 statsvn使用小记 java.net.URLEncoder对中文的编码和解码 Apache配置WebSocket代理 php批量检查https证书有效期 504 Gateway Time-out ( Nginx + PHP ) 解决小计 VMware 扩展磁盘容量 Docker常用命令 Docker 安装 MySQL 学习笔记
查看mysql字符集、修改数据库、数据表、字段字符集
coffee · 2019-10-23 · via 博客园 - coffee

查看所有表的字符集

SELECT table_name, table_type, engine, version, table_collation FROM information_schema.tables WHERE table_schema = 'test_db11' ORDER BY table_name DESC;

查看单张表字段的字符集

SHOW FULL COLUMNS FROM sw_test_table11;

使用效果截图

转载:https://www.cnblogs.com/youjianjiangnan/p/9114791.html

修改数据库字符集

ALTER DATABASE db_name DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

把表默认的字符集和所有字符列(CHAR,VARCHAR,TEXT)改为新的字符集

ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

只是修改表的默认字符集
  
ALTER TABLE tbl_name DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

修改字段的字符集

ALTER TABLE tbl_name CHANGE title title VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

查看数据库编码

SHOW CREATE DATABASE db_name;

查看表编码

SHOW CREATE TABLE tbl_name;

查看字段编码

SHOW FULL COLUMNS FROM tbl_name;