vi /etc/my.cnf
wait_timeout=2880000
interactive_timeout = 2880000
max_allowed_packet = 100M
完整配置文件
[mysqld] #init_connect='SET collation_connection = utf8_unicode_ci' #init_connect='SET NAMES utf8' #character-set-server=utf8 #collation-server=utf8_unicode_ci #skip-character-set-client-handshake wait_timeout=2880000 interactive_timeout = 2880000 max_allowed_packet = 100M [client] #default-character-set=utf8 [mysql] #default-character-set=utf8 [mysqld_safe] log-error=/var/log/mariadb/mariadb.log #pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d