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 |
+----------------------+-------+服務器

相關文章
相關標籤/搜索