Difference between revisions of "MySQL Commands snippets"

From DevOps Notebook
Line 7: Line 7:
 
=== Disable query cache without mysql restart ===
 
=== Disable query cache without mysql restart ===
 
<pre>
 
<pre>
SET GLOBAL query_cache_size = 0;
+
mysql> SET GLOBAL query_cache_size = 0;
 +
</pre>
 +
=== Increase MySQL Connections without restart ===
 +
<pre>
 +
mysql> show variables like 'max_connections';
 +
mysql> SET GLOBAL max_connections = 1000;
 
</pre>
 
</pre>

Revision as of 15:33, 16 July 2021

Get limited number of records from mysqldump
MySQL all databases backup in separate files
Restore single MySQL table from a full database mysqldump backup file
mysqldump all tables from database in separate files


Disable query cache without mysql restart

mysql> SET GLOBAL query_cache_size = 0;

Increase MySQL Connections without restart

mysql> show variables like 'max_connections';
mysql> SET GLOBAL max_connections = 1000;