Enable Slow Query Log in MySQL without restart Mysql

Friday, June 19, 2015

Enable Slow Query Log in MySQL without restart Service

there are below steps :-

root in [~]# touch /var/log/mysql-slow.log
root in [~]# chown mysql:mysql /var/log/mysql-slow.log
root in [~]# mysql -e 'SET GLOBAL slow_query_log=1;'
root in [~]# mysql -e 'SET GLOBAL slow_query_log_file="/var/log/mysql-slow.log";'
root in [~]# mysql -e 'SET GLOBAL long_query_time=2;'

Read more...

About This Blog

Lorem Ipsum

  © Copyright 2009 Linux-HelpLine.Blogspot.com

Back to TOP