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:52] – luke7858 | mysql_connections [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== mysql/ | + | === mysql/ |
| - | Viewing current | + | ^ Variable Name ^ Definition ^ |
| - | To view connections, log into mysql and run: | + | | Threads_connected | The number of currently open connections. | |
| + | | Connections | The number of connection attempts (successful or not) to the MySQL server | | ||
| + | \\ | ||
| + | Viewing configured | ||
| + | <sxh bash> | ||
| + | show variables like " | ||
| + | </ | ||
| + | From command line: | ||
| + | <sxh bash> | ||
| + | mysql -e 'show variables;' | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | View the current connections with: | ||
| <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 11: | 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.1454313152.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
