mysql设置编码为UTF8,设置表为UTF8。
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql设置编码为UTF8,设置表为UTF8。相关的知识,希望对你有一定的参考价值。
1.设置编码为UTF-8
set character_set_client = utf8; set character_set_server = utf8; set character_set_connection = utf8; set character_set_database = utf8; set character_set_results = utf8; set collation_connection = utf8_general_ci; set collation_database = utf8_general_ci; set collation_server = utf8_general_ci;
2.设置表为UTF-8
alter table tb_anniversary convert to character set utf8;
3.另外新建数据库时,设置库为UTF-8
create database app_relation character set utf8;
以上是关于mysql设置编码为UTF8,设置表为UTF8。的主要内容,如果未能解决你的问题,请参考以下文章
使用vc6操作mysql,表为utf8编码,insert中文,如何解决乱码?