本文共 536 字,大约阅读时间需要 1 分钟。
登录
mysql -u root -pEnter password:
修改最大连接数
mysql> set GLOBAL max_connections=200;Query OK, 0 rows affected (0.00 sec)
修改 wait_timeout
# vi /etc/my.cnf[mysqld]wait_timeout=60
mysql> show global variables like 'wait_time';Empty set (0.00 sec)mysql> show global variables like 'wait_timeout';+---------------+-------+| Variable_name | Value |+---------------+-------+| wait_timeout | 60 |+---------------+-------+1 row in set (0.00 sec)
最后别忘了重启服务
service mysqld restartRedirecting to /bin/systemctl restart mysqld.service
转载地址:http://nehji.baihongyu.com/