修改mysql配置文件 vim /etc /my.cnf 在[mysqld]栏下面加两行参数 interactive_timeout= 31536000 wait_timeout=31536000 #31536000为延期一年