2

So, I'm trying to analyse some of my program's MySQL queries. However, while I've got MySQL general query logging turned on, and can view the log file in a text editor (eg. notepad++), the program writes 1000s of lines of query a minute, so I could do with a slightly better program for reading the logs. Things that would be nice:

  • Better syntax highlighting.
  • Real-time updating.
  • doesn't get too slow when looking at long files
  • Handles random binary sequences in the log without breaking

Any suggestions?

Edit: Windows-7 compatible programmes only

1
  • I typically just tail -f the log. . . Commented Dec 12, 2012 at 16:06

4 Answers 4

1

You can try using tail -f <file_path>. That will follow the log as it's appended to.

Additionally, you could give multitail a try. It supports syntax highlighting (through regex).

Sign up to request clarification or add additional context in comments.

Comments

0

pt-query-digest from the Percona Toolkit (= Maatkit, but Maatkit will not be developed any further, so switch to the Percona Toolkit). Don't use as a 'live' inspector though, but just as a bulk tool.

Comments

0

Use mysql log tables like general log and slow query log.

Update your mysql config file with:

general_log=1
slow_query_log=1
slow-launch-TIME = 2
log-output = TABLE

OR

You can use MySQL Administrator to view logs(general log, slow query log, error log).

OR

You can also view that log file using TextPad software. It can support a file more than a GB to read write.

Comments

0

So far, from testing out a bunch of programmes, the best option I've found is baretail, which has good real-time updating and handles large files reasonably well. It could do with better MySql-specific syntax, but it's not bad.

Alternatively, it turns out that there are actually options in notepad++ (in preferences: misc) to turn on real-time updating, but this doesn't work well unless you have focus on the notepad++ window

There's also a windows implementation of tail

1 Comment

INMO, Navicat Monitor is a better tool and easier to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.