User Tools

Site Tools


mysql_connections

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mysql_connections [2016/02/01 08:09] luke7858mysql_connections [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 === mysql/MariaDB connections === === mysql/MariaDB connections ===
-Log into mysql and vie the current connections with:+^ 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 configured connections: 
 +<sxh bash> 
 +show variables like "max_connections"; 
 +</sxh> 
 +From command line: 
 +<sxh bash> 
 +mysql -e 'show variables;' | grep max_connections 
 +</sxh> 
 +  
 +\\ 
 +\\ 
 +View the current connections with:
 <sxh bash> <sxh bash>
 SHOW STATUS WHERE `variable_name` = 'Threads_connected'; SHOW STATUS WHERE `variable_name` = 'Threads_connected';
 +</sxh>
 +\\
 +\\
 +**Note**: 
 +The following command does NOT show current connections, it shows the history of attempted connections (successful or not).
 +\\
 +http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html#statvar_Connections 
 +<sxh bash>
 +show status like 'Con%'
 </sxh> </sxh>
 \\ \\
Line 14: Line 38:
 \\ \\
 ==== /etc/my.cnf ==== ==== /etc/my.cnf ====
 +[mysqld]
 <sxh bash> <sxh bash>
 set-variable=max_connections=200 set-variable=max_connections=200
 </sxh> </sxh>
mysql_connections.1454314144.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki