Complete the code to check the current value of the max_connections setting.
SHOW VARIABLES LIKE '[1]';
The max_connections variable controls the maximum number of simultaneous client connections. Using SHOW VARIABLES LIKE 'max_connections'; displays its current value.
Complete the code to set the innodb_buffer_pool_size to 1GB dynamically.
SET GLOBAL [1] = 1073741824;
The innodb_buffer_pool_size controls the size of the buffer pool for InnoDB tables. Setting it to 1073741824 bytes (1GB) dynamically uses SET GLOBAL innodb_buffer_pool_size = 1073741824;.
Fix the error in the command to persistently change the wait_timeout to 300 seconds.
SET PERSIST [1] = 300;
The wait_timeout variable controls how long the server waits before closing an idle connection. To persistently change it, use SET PERSIST wait_timeout = 300;.
Fill both blanks to check the current value of the slow query log and its file location.
SHOW VARIABLES LIKE '[1]'; SHOW VARIABLES LIKE '[2]';
The slow_query_log variable shows if the slow query log is enabled. The slow_query_log_file variable shows the file path where slow queries are logged.
Fill all three blanks to create a persistent setting that enables the slow query log and sets the log file to '/var/log/mysql/slow.log'.
SET PERSIST [1] = [2]; SET PERSIST [3] = '/var/log/mysql/slow.log';
To enable the slow query log persistently, set slow_query_log to ON. Then set slow_query_log_file to the desired file path. Both changes use SET PERSIST to survive server restarts.