mysql支持表情符
2015-06-17 18:15
316 查看
/etc/my.cnf
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-server = utf8mb4
重启mysql
mysql> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_unicode_ci |
| collation_database | utf8mb4_unicode_ci |
| collation_server | utf8mb4_unicode_ci |
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-server = utf8mb4
重启mysql
mysql> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_unicode_ci |
| collation_database | utf8mb4_unicode_ci |
| collation_server | utf8mb4_unicode_ci |
相关文章推荐
- mysql优化之路----hash索引优化
- MySQL优化必须调整的10项配置
- LAMP服务器性能优化技巧之Mysql优化
- 有关mysql优化的一些东东整理
- 21条MySQL优化建议(经验总结)
- 101个MySQL调试和优化技巧
- mysql性能优化-慢查询分析、优化索引和配置
- MySQL百万级数据库优化方案
- 生产环境高并发MySQL SQL语句优化10条案例
- 运维角度浅谈MySQL数据库优化
- MySQL性能优化的最佳21条经验
- MySQL中创建及优化索引组织结构的思路
- mysql多表关联查询的优化方法
- mysql慢查询日志监控
- mysql 优化(消除filesort)
- Sql查询语句优化心得 MySQL优化
- MySQL批量插入性能优化
- 大型网站架构提速关键技术(页面静态化、memcached、Mysql优化)
- mysql优化:连接数
- MySQL表结构优化、数据类型选择方法