Is there any query/way to show the last queries executed on ALL servers?
If mysql binlog is enabled you can check the commands ran by user by executing following command in linux console by browsing to mysql binlog directory
mysqlbinlog binlog.000001 > /tmp/statements.sql
enabling
[mysqld]
log = /var/log/mysql/mysql.log
or general log will have an effect on performance of mysql
Maybe you could find that out by looking at the query log.
For those blessed with MySQL >= 5.1.12, you can control this option globally at runtime:
SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 'ON';
mysql.general_log
If you prefer to output to a file instead of a table:
SET GLOBAL log_output = "FILE";
the default.SET GLOBAL general_log_file = "/path/to/your/logfile.log";
SET GLOBAL general_log = 'ON';
I prefer this method to editing .cnf files because:
my.cnf
file and potentially permanently turning on logging/var/log /var/data/log
/opt /home/mysql_savior/var
For more information, see MySQL 5.1 Reference Manual - Server System Variables - general_log
If you don't feel like changing your MySQL configuration you could use an SQL profiler like "Neor Profile SQL" http://www.profilesql.com .