"Mike Chirico" <mc******@comcast.net> wrote in message
news:Zd********************@comcast.com...
"Jon Glazer" <jg**************@adconn.com> wrote in message
news:BX***************@fe2.columbus.rr.com... Is there a way to watch what queries come into the MYSQL server? What
application should I use to do this?
I use the following:
mysql> show binlog events;
Or, if using Unix
$ mysqlbinlog <logfile>
Setting the binary log file. This can be configured in /etc/my.cnf
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
log-bin = /usr/local/var/mysqlLOGb.log
log = /usr/local/var/mysqlLOG.log
or for the default hostname just log-bin
[mysqld]
port = 3306
socket = /tmp/mysql.sock
log-bin
IMPORTANT: The default my.cnf has a "log-bin" entry. Make sure it is not
listed twice.
It's also possible to set the text log file. Note both "log-bin" and
"log" are set here:
[mysqld]
port = 3306
socket = /tmp/mysql.sock
log-bin = /usr/local/var/mysqlLOGb.log
log = /usr/local/var/mysqlLOG.log
Note, (see TIP 24 - link below) the binary log file works with the "show
binlog events command" and shows, updates,
creates, deletes, and drops, but no select statements. In contrast, the
text log-file "/usr/local/var/mysqlLOG.log"
shows the user, and the select statement, all of the above, but it's in a
text file. I believe the text
format is going away with version 5.0.
The following command "DOES NOT" give information about these log files:
http://osdn.dl.sourceforge.net/sourc...ADME_mysql.txt
Regards,
Mike Chirico