日期:2014-05-16  浏览次数:20671 次

MySql 修改编码以及字符集

进入数据库的安装目录:C:/Program Files/MySQL/MySQL Server 5.0

里面有一个my.ini文件 找到这个位置

CLIENT SECTION
# ----------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]

port=3306

[mysql]

default-character-set=utf8

# ----------------------------------

在这段,你可以 修改数据库使用的 字符集

***************************************************************************

[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=utf8

# ----------------------------------

在这段,你可以 修改数据库使用的 编码

?