关于MySql5.1版中文乱码的问题

发布网友 发布时间:2022-04-23 00:45

我来回答

3个回答

热心网友 时间:2022-04-08 20:49

在MY.INI 文件中,还要改一个东西!

[client]

port=3306

[mysql]

default-character-set=gbk

# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.0/"

#Path to the database root
datadir="C:/Program Files/MySQL/MySQL Server 5.0/Data/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=gbk //这个地方呢???

# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB

热心网友 时间:2022-04-08 22:07

1

热心网友 时间:2022-04-08 23:42

执行语句:mysql> alter table tablenames modify 字段名 char(20) character set gbk;

参考资料:http://tongchengren.5d6d.com/viewthread.php?tid=43&pid=54&page=1&extra=page%3D1#pid54

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com