Created
November 15, 2018 12:58
-
-
Save ayuLiao/9c294436ba03c0800f5e5e382ee3a368 to your computer and use it in GitHub Desktop.
查看、修改MySQL最大链接数
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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