"ZacT1984" <zt******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.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=<path>.
See
http://dev.mysql.com/doc/refman/5.0/...ion-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.