1. 程式人生 > >Mysql 亂碼解決問題

Mysql 亂碼解決問題

[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
#init_connect='SET NAMES utf8'


# Cache & Buffer Size
max_allowed_packet = 1G
key_buffer_size =768M
table_cache =256M
sort_buffer_size =64M
read_buffer_size =64M
read_rnd_buffer_size =64M
myisam_sort_buffer_size = 64M
tmp_table_size=256M
query_cache_type=1
query_cache_limit=32M
connect_timeout=100000


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
default-character-set=utf8


[client]
default-character-set=utf8


[mysql]
default-character-set=utf8


[mysqldump]
quick
max_allowed_packet = 16M