Question: Automate the following - - - ENABLE SLOW QUERIES - - - 1 . Turn on slow query logset global slow _ query _ log
Automate the following
ENABLE SLOW QUERIES Turn on slow query logset global slowquerylog ON; Set the amount of time a query needs to run before being loggedset global longquerytime ; Exit the pod Enter the pod mysql session Check the slow query log is ON & path to slow query log fileshow variables like slow; Check the long query execution timeshow variables like longquerytime; Queries will be populated in slow query log file. DISABLE SLOW QUERIES Turn off slow query logset global slowquerylog 'OFF'; Set the 'longquerytime' variable back to default valueset global longquerytime ; Exit the pod
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
