Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Servers
Reload this Page How do I Active MySQL Query Log?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Servers Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Reply
 
Thread Tools Display Modes
Old 06-22-2008   #1 (permalink)
FredJones
Just Joined!
 
Join Date: Mar 2008
Posts: 10
How do I Active MySQL Query Log?

I need to active the MySQL query log on:

Server version: 5.0.45 Source distribution

I tried editing

/etc/my.cnf

and mine now looks like:

Code:
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
wait_timeout=1800
max_connections=150
connect_timeout=10

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
log=/var/log/mysqld.log
log-output = FILE,TABLE
and of course I ran:

Code:
service mysqld restart

but when I view /var/log/mysqld.log I just see startup/shutdown things, but no queries. Can anyone point me in the right direction to get the query log turned on?

Thanks!
FredJones is offline   Reply With Quote
Old 06-24-2008   #2 (permalink)
motnerog
Just Joined!
 
Join Date: Jun 2008
Posts: 1
i'm guessing you already checked this, but nonetheless:

MySQL :: MySQL 5.1 Reference Manual :: 5.2.3 The General Query Log


Good Luck!
motnerog is offline   Reply With Quote
Old 06-25-2008   #3 (permalink)
FredJones
Just Joined!
 
Join Date: Mar 2008
Posts: 10
Yes, I read that page several times. I now see the problem. I have version 5.0.45 but the general query log apparently only exists from MySQL 5.1.6.

Thank you.
FredJones is offline   Reply With Quote
Old 06-27-2008   #4 (permalink)
FredJones
Just Joined!
 
Join Date: Mar 2008
Posts: 10
answer is it must be in the

[mysqld]

section not in the

[mysqld_safe]

section
FredJones is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 01:18 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0