Troubleshooting of Query Execution in Mysql DB

 

To know what mysql is doing we enable the query logging.

Enable Query logging

  • Enter mysql console as root

# mysql -uroot -p

  • Enable logging:mysql> SET global general_log = 1; SET global log_output = ‘table’;
  • View the log and see what is supposed to be executed

mysql> select * from mysql.general_log;

Disable Query loggning

mysql> SET global general_log = 0;

This is useful when you want to track whats going on in your SIP server’s database.

To know about other types of mysql logging Mysql-Server-Logs

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s