mysql修改最大链接数笔记

MySQL 默认的最大链接数为 151
mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+mysql

设置这个最大链接数值
mysql> set GLOBAL max_connections=512; sql

或vim /etc/my.cnf
[mysqld]
max_connections=512vim

查看服务器响应的最大链接数:
show global status like 'Max_used_connections';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| Max_used_connections | 95 |
+----------------------+-------+服务器

相关文章
相关标签/搜索