mysql_connections
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mysql_connections [2016/02/01 07:50] – luke7858 | mysql_connections [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== mysql/ | + | === mysql/ |
- | Viewing current connections: | + | ^ Variable Name ^ Definition ^ |
+ | | Threads_connected | The number of currently open connections. | | ||
+ | | Connections | The number of connection attempts (successful or not) to the MySQL server | | ||
+ | \\ | ||
+ | Viewing | ||
+ | <sxh bash> | ||
+ | show variables like " | ||
+ | </ | ||
+ | From command line: | ||
+ | <sxh bash> | ||
+ | mysql -e 'show variables;' | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ | View the current connections | ||
<sxh bash> | <sxh bash> | ||
SHOW STATUS WHERE `variable_name` = ' | SHOW STATUS WHERE `variable_name` = ' | ||
</ | </ | ||
\\ | \\ | ||
+ | \\ | ||
+ | **Note**: | ||
+ | The following command does NOT show current connections, | ||
+ | \\ | ||
+ | http:// | ||
+ | <sxh bash> | ||
+ | show status like ' | ||
+ | </ | ||
\\ | \\ | ||
==== Configuring Maximum Connections ==== | ==== Configuring Maximum Connections ==== | ||
Line 10: | Line 33: | ||
<sxh bash> | <sxh bash> | ||
+ | SET GLOBAL max_connections = 200; | ||
</ | </ | ||
\\ | \\ | ||
\\ | \\ | ||
==== /etc/my.cnf ==== | ==== /etc/my.cnf ==== | ||
+ | [mysqld] | ||
<sxh bash> | <sxh bash> | ||
+ | set-variable=max_connections=200 | ||
</ | </ |
mysql_connections.1454313002.txt.gz · Last modified: 2024/05/23 07:26 (external edit)