摘要:修改字符集的方法,就是使用mysql的命令 mysql> SET character_set_client = utf8 ; mysql> SET character_set_connection = utf8 ; 使用 mysql> SHOW VARIABLES LIKE \'character%\';查看,发现数据库编码均已改成utf8 +------------
修改字符集的方法,就是使用mysql的命令
mysql> SET character_set_client = utf8 ;
mysql> SET character_set_connection = utf8 ;
使用 mysql> SHOW VARIABLES LIKE \'character%\';查看,发现数据库编码均已改成utf8
+--------------------------+---------------------------------+
| Variable_name | &#118alue |
+--------------------------+---------------------------------+
| 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 | D:"mysql-5.0.37"share"charsets" |
+--------------------------+---------------------------------+
mysql> SHOW VARIABLES LIKE \'collation_%\';
+----------------------+-----------------+
| Variable_name | &#118alue |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
或者 打开mysql安装目录,里面有个my.ini文件,打开这个文件,里面有两处字符集的设置,默认是拉丁,建议你所想改的,如:utf8或gbk然后启动mysql服务,以后创建的数据库默认字符集就是ok了(重启时,打开MySQLAdministrator的Service Control进行操作就可以了。)
相关文章推荐
虚拟主机的专业参数,分别都是什么意思?2022-09-09
中非域名注册规则是怎样的?注册域名有什么用处? 2022-01-10
HostEase新年活动促销 美国/香港主机全场低至五折2021-12-28
HostGator下载完整备份教程分享2021-12-28
Flink中有界数据与无界数据的示例分析2021-12-28