mysql配置

/ 爬坑指南 / 没有评论 / 454浏览

解决Linux中mysql中文问号乱码

#[mysqld]
character-set-server=utf8
init_connect='SET NAMES utf8'

[mysql]
default-character-set=utf8

service mysqld restart;

show variables like 'character_set%';

解决mysql默认8小时断开

在mysql的my.ini最后加上

# this is myown dinifition for mysql connection timeout
wait_timeout=31536000
interactive_timeout=31536000