0
0
MySQLquery~10 mins

Server configuration tuning in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to check the current value of the max_connections setting.

MySQL
SHOW VARIABLES LIKE '[1]';
Drag options to blanks, or click blank then click option'
Amax_connections
Bmax_allowed_packet
Cinnodb_buffer_pool_size
Dwait_timeout
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name unrelated to connections.
Trying to use SELECT instead of SHOW VARIABLES.
2fill in blank
medium

Complete the code to set the innodb_buffer_pool_size to 1GB dynamically.

MySQL
SET GLOBAL [1] = 1073741824;
Drag options to blanks, or click blank then click option'
Amax_connections
Bmax_allowed_packet
Cwait_timeout
Dinnodb_buffer_pool_size
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to set a read-only variable.
Using SET SESSION instead of SET GLOBAL.
3fill in blank
hard

Fix the error in the command to persistently change the wait_timeout to 300 seconds.

MySQL
SET PERSIST [1] = 300;
Drag options to blanks, or click blank then click option'
Ainnodb_buffer_pool_size
Bwait_timeout
Cmax_connections
Dmax_allowed_packet
Attempts:
3 left
💡 Hint
Common Mistakes
Using SET GLOBAL instead of SET PERSIST for persistence.
Choosing a variable unrelated to timeout.
4fill in blank
hard

Fill both blanks to check the current value of the slow query log and its file location.

MySQL
SHOW VARIABLES LIKE '[1]';
SHOW VARIABLES LIKE '[2]';
Drag options to blanks, or click blank then click option'
Aslow_query_log
Bmax_connections
Cslow_query_log_file
Dinnodb_buffer_pool_size
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the variable names.
Using unrelated variables like max_connections.
5fill in blank
hard

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'.

MySQL
SET PERSIST [1] = [2];
SET PERSIST [3] = '/var/log/mysql/slow.log';
Drag options to blanks, or click blank then click option'
Aslow_query_log
BON
Cslow_query_log_file
DOFF
Attempts:
3 left
💡 Hint
Common Mistakes
Using OFF instead of ON to enable the log.
Not using SET PERSIST for persistent changes.