mysql中怎么出现汉字 mysql无法显示中文
如何在mysql中显示中文???
utf8Web页面:
成都创新互联专注于洛宁网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供洛宁营销型网站建设,洛宁网站制作、洛宁网页设计、洛宁网站官网定制、重庆小程序开发公司服务,打造洛宁网络公司原创品牌,更为您提供洛宁网站排名全网营销落地服务。
查询之前执行一下:
set character set 'utf8' 语句(SQL)
同样写入数据执行一下:
set names 'utf8'
如果你是用的客户端直接查询mysql,可将上面的utf8改为gbk试试
怎样往MYSQL输入汉字?
有两种方法...你试一下...不行的话加我的QQ
76558882
1.
修改
mysql
安装目录下的
my.ini
修改
default-character-set=latin1
把latin1
改为
gb2312
或
gbk
注意:
修改两处
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=latin1
//把
latin1
改为
gb2312或
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=latin1
//将latin1
改为
gb2312
或
gbk
2.
进入在命令提示符下登录mysql
输入
charset
gb2312
你再尝试使用
insert
into
插入一条记看看...
mysql那个版本可以显示汉字和数字
ySQL4.x版本。mysql是一款数据库产品,在ySQL4.x这个版本,可以显示汉字和数字,3.x只有latin1编码,数据库正在不断的进行发展,功能会越来越多。
当前名称:mysql中怎么出现汉字 mysql无法显示中文
文章地址:http://pwwzsj.com/article/dodgesh.html