WDlinux官方论坛's Archiver

lfghx 发表于 2011-11-17 17:52

如何更改mysql的用户登录的时候所使用的字符集,用utf-8

**** 作者被禁止或删除 内容自动屏蔽 ****

admin 发表于 2011-11-17 20:30

在/www/wdlinux/etc/my.cnf
[client]下添加
default-character-set=utf8
[mysqld]下添加
default-character-set=utf8

lfghx 发表于 2011-11-17 22:24

**** 作者被禁止或删除 内容自动屏蔽 ****

lfghx 发表于 2011-11-17 22:24

**** 作者被禁止或删除 内容自动屏蔽 ****

lfghx 发表于 2011-11-17 22:29

**** 作者被禁止或删除 内容自动屏蔽 ****

lfghx 发表于 2011-11-17 22:35

**** 作者被禁止或删除 内容自动屏蔽 ****

lfghx 发表于 2011-11-17 22:42

**** 作者被禁止或删除 内容自动屏蔽 ****

wangxh 发表于 2013-8-27 08:17

[quote]+--------------------------+--------+
| Variable_name            | Value  |
+--------------------- ...
[size=2][color=#999999]lfghx 发表于 2011-11-17 22:42[/color] [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=150&ptid=48][img]http://www.wdlinux.cn/bbs/images/common/back.gif[/img][/url][/size][/quote]


什么意思? 问题解决了没有?

gddn 发表于 2021-12-7 17:06

在mysqld中加入的是[b] character-set-server=utf8 [/b]而不是 default-character-set=utf8

否则会报:Starting MySQL...The server quit without updating PID file [失败]lib/mysql/localhost.localdomain.pid).异常

从而无法重启mysqld服务(在wdcp后台报“重启失败”)

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.