Ever wondered what SQL statements are fired when you click on various options in phpMyAdmin. You can learn a great deal of SQL if you can just observe what is happening behind the scenes!
All you have to do is just check the localhost.log file in your data directory of mysql.
run the following in a terminal so that you are viewing things as it is happening:
tail -f /path/of/localhost.log
tail -f /usr/local/LAMP/db/mysql/data/localhost.log
Open phpMyAdmin and align these two windows so that you can see both at same time. Now go on clicking the various familiar and unfamiliar links in phpMyAdmin and check the SQLs in the terminal. These not so common SQLs happening behind the scenes are the nuts and bolts if you need to extract server level information about MySQL.
In fact, another useful thing you can check is how many individual SQL connections are made if you just load our home page! Just browse few pages and you may come to know what statements could be causing DB load!
Contributor: Vibhor Singh – Lead Software Development, www.quikr.com