Logging Queries on mysql with FreeBSD

Logging Queries on mysql with FreeBSD

am 20.03.2006 20:26:42 von ZacT1984

Hi,
I am trying to set up my mySQL server on FreeBSD to log every query a
user runs. I understand I must edit the my.cnf file. But one does not
exist for my install. I installed mySQL from the FreeBSD packages and
for some reason, it did not create a my.cnf file in /etc or anywhere.
Where can I set it up to log every query a user runs?

Re: Logging Queries on mysql with FreeBSD

am 20.03.2006 21:47:35 von Bill Karwin

"ZacT1984" wrote in message
news:1142882802.271941.143010@g10g2000cwb.googlegroups.com.. .
> Hi,
> I am trying to set up my mySQL server on FreeBSD to log every query a
> user runs. I understand I must edit the my.cnf file. But one does not
> exist for my install. I installed mySQL from the FreeBSD packages and
> for some reason, it did not create a my.cnf file in /etc or anywhere.
> Where can I set it up to log every query a user runs?

Correct, the my.cnf file does not exist in a default installation. You have
to create it.

The my.cnf file typically resides either in /etc or in $MYSQL_HOME (aka the
data-directory).
You can also specify the location of a supplementary options file when
invoking mysqld (e.g. within the mysqld_safe script) using
option --default-extra-file=.

See http://dev.mysql.com/doc/refman/5.0/en/option-files.html for more
information on the location and format of the option files.

You can also enable the General Query Log using command-line arguments to
mysqld, without editing the my.cnf file; see
http://dev.mysql.com/doc/refman/5.0/en/query-log.html. However, to enable
this by default you'd probably want to edit the mysqld_safe script that
invokes mysqld. It's better to use the my.cnf file, so that the options
will take effect automatically when MySQL starts.

Regards,
Bill K.