Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You can log every query to a log file really easily:
- mysql> SHOW VARIABLES LIKE "general_log%";
- +------------------+----------------------------+
- | Variable_name | Value |
- +------------------+----------------------------+
- | general_log | OFF |
- | general_log_file | /var/run/mysqld/mysqld.log |
- +------------------+----------------------------+
- mysql> SET GLOBAL general_log = 'ON';
- Do your queries (on any db). Grep or otherwise examine /var/run/mysqld/mysqld.log
- Then don't forget to
- mysql> SET GLOBAL general_log = 'OFF';
- or the performance will plummet and your disk will fill!
Advertisement