There are many ways to view raw requests, sniff ports using tcpdump, mysql-proxy, or view mysqladmin -ppasswd, although you can do this for a short time:
Start: echo "set global general_log_file=mysqllogfile;set global general_log=1;" | mysql -u root -ppasswd From now on all queries will appear in /var/lib/mysql/mysqllogfile Stop: echo "set global general_log=0;" | mysql -u root -ppasswd
Do not forget to disconnect when done!
You can write queries to the mysql.general_log table:
echo "set global log_output=TABLE;" | mysql -u root -ppasswd
Note that viewing the general_log table also forces them to be updated!
source share