linux mysql 数据库乱码的解决办法

linux 上mysql数据库区分大小写的配置

lower_case_table_names=1 1-不区分大小写 0-区分大小写

 

修改/etc/my.cnf 具体的修改内容如下:

 

[client]

default-character-set=utf8

 

[mysqld]

datadir=/var/lib/mysql

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

user=mysql

lower_case_table_names=1

character-set-server=utf8

character-set-filesystem = utf8

#default-character-set=utf8

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

symbolic-links=0

 

[mysqld_safe]

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

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

 

你可能感兴趣的:(linux,mysql,数据库乱码)