Create General query log

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to turn on General logging on mysql server [on a RHE linux

If I go >mysqld -l filename
on shell, it says "command not found". What is the best way to create
General log on a live server.

Somehow MYSQL server doesn't have a my.cnf file. I have searched all
over but there are no signs. Whenever I have to start/stop/restart the
server, I use the ready-made mysql script.

Any suggestions??


Re: Create General query log

On many installations, the my.cnf file isn't created by default, though
it is typically in /etc/my.cnf .  You can find out where it is expected
by running: "mysqld --help --verbose"

You should see a line of output that looks like this (along with a lot
of other stuff):

Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf
The following groups are read: mysqld server mysqld-5.0

Once you know what option file to use, create the file and put your
options in it (in your case, you'd need to add a [mysqld] section to
the blank file and then enable the general query log under that, then
restart the server).

We also provide MySQL and PostgreSQL training - both on-site and public
enrollment courses.

Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
Phone: 877-258-8987/919-463-0999

Ozz wrote:
Quoted text here. Click to load it

Site Timeline