Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How do I profile a MySQL database. I want to see all the SQL being run against a database.

I know you can do this:

  • set profiling=1;
  • Run your slow query (eg SELECT * FROM messages WHERE fromaddress='xxx';
  • SHOW PROFILES;

But this seem to only apply to stuff run on the command line, I want to see the results from running a website.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
268 views
Welcome To Ask or Share your Answers For Others

1 Answer

You want the query log - but obviously doing this on a heavy production server could be... unwise.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...