Created
June 7, 2016 13:22
-
-
Save Exadra37/d93e4f1b1918772d689799b27e1a17c9 to your computer and use it in GitHub Desktop.
Watch Mysql queries in real time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> tail -f -n 100 /var/lib/mysql/devint1.log | |
... | |
8941 Prepare select * from `stepFeed` where `productId` = ? limit 1 | |
8941 Execute select * from `stepFeed` where `productId` = '764773' limit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> SHOW VARIABLES LIKE "general_log%"; | |
+------------------+----------------------------+ | |
| Variable_name | Value | | |
+------------------+----------------------------+ | |
| general_log | OFF | | |
| general_log_file | /var/lib/mysql/devint1.log | | |
+------------------+----------------------------+ | |
2 rows in set (0.00 sec) | |
mysql> SET GLOBAL general_log = 'ON'; | |
Query OK, 0 rows affected (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment