linux数据库乱码解决方法


当前第2页 返回上一页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

#/etc/my.cnf

  

[client]

default-character-set=utf8

  

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

#default-character-set=utf8

character-set-server=utf8

init_connect='SET NAMES utf8'

  

[mysql]

no-auto-rehash

default-character-set=utf8

  

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

切记:在mysqld中加入的是 character-set-server=utf8 而不是 default-character-set=utf8 。

相关文章教程推荐:linux教程

以上就是linux数据库乱码解决方法的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

Linux下的软件防火墙iptables――规则的定义与删除

如何使用实例自定义脚本自定义实例的管理员账号

Linux系统下如何切换到root用户

Linux系统如何打开rar格式的压缩文件

Linux su认证失败

Linux中命令无法使用

Linux输出乱码怎么解决

实例进入欠费回收中状态后如何可以结清账单并重开机

$在Linux中什么意思

Linux主要拿来干什么的

更多相关阅读请进入《Linux》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...