mysql_tuning
Warning: Undefined variable $html in /usr/share/nginx/html/lib/plugins/tabinclude/helper.php on line 240
Warning: Undefined array key "page" in /usr/share/nginx/html/lib/plugins/tabinclude/helper.php on line 265
Warning: Undefined array key "page" in /usr/share/nginx/html/lib/plugins/tabinclude/helper.php on line 268
Mysql Tuning
mysql tuning script:
wget https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl; chmod +x mysqltuner.pl; ./mysqltuner.pl
- mysql connections
- Query Caching
- thread_caching - Page not found.
mysql/MariaDB 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 configured connections:
show variables like "max_connections";From command line:
mysql -e 'show variables;' | grep max_connections
View the current connections with:
SHOW STATUS WHERE `variable_name` = 'Threads_connected';
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
show status like 'Con%'
Configuring Maximum Connections
Run time
SET GLOBAL max_connections = 200;
/etc/my.cnf
[mysqld]
set-variable=max_connections=200
mysql_tuning.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1