设置mysql在linux下字符集为utf8,解决可能出现的乱码

找到etc/my.conf

 

2. 修改mysql字符集

执行下列命令:# cd /usr/share/mysql

# cp my-huge.cnf /etc/my.conf

# vi /etc/my.cnf

找到客户端配置[client] 

在下面添加 

default-character-set=utf8

在找到[mysqld] 

添加default-character-set=utf8
以及在文件末尾添加

[server]

default-character-set=utf8

[database]

default-character-set=utf8

3.

innodbinnodb_buffer_pool_size = 2560M

innodb_log_buffer_size  = 8M

innodb_flush_log_at_trx_commit  = 2

innodb_thread_concurrency   = 16

innodb_flush_method = O_DIRECT
I tried to delete /var/lib/mysql/ib_logfile0 and restart mysqld but it still failed. It now shows the following in error log.

转载于:https://www.cnblogs.com/Rioyang/archive/2010/11/09/1872296.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值