Skip to content

Instantly share code, notes, and snippets.

@ayuLiao
Created November 15, 2018 12:58
Show Gist options
  • Save ayuLiao/9c294436ba03c0800f5e5e382ee3a368 to your computer and use it in GitHub Desktop.
Save ayuLiao/9c294436ba03c0800f5e5e382ee3a368 to your computer and use it in GitHub Desktop.
查看、修改MySQL最大链接数
mysql root@localhost:(none)> show variables like '%max_connections%'; #查看mysql最大链接数
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
1 row in set
Time: 0.017s
mysql root@localhost:(none)> set global max_connections=1000; #将最大链接修改成1000
Query OK, 0 rows affected
Time: 0.001s
mysql root@localhost:(none)> show variables like '%max_connections%'; #再次查看
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 1000 |
+-----------------+-------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment