LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 06-19-2004, 09:52 AM   #1
dominant
Member
 
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
mysql logs on a slack


Do you know where mysql keeps its log files?
 
Old 06-20-2004, 06:31 AM   #2
dominant
Member
 
Registered: Jan 2004
Posts: 409

Original Poster
Rep: Reputation: 30
any ideas?
 
Old 06-20-2004, 07:02 AM   #3
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282

Rep: Reputation: 61
By default apparently mysqld don't log in plain text files. You can add log parameters in /etc/rc.d/rc.mysqld :
change :
Code:
/usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP &
to:
Code:
/usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid --log=/var/lib/mysql/access_log --err-log=/var/lib/mysql/error_log $SKIP &
So you log queries & connections in /var/lib/mysql/access_log and mysqld errors in /var/lib/mysql/error_log, I find it is a good place because /var/lib/mysql should be owned by mysql
 
Old 06-20-2004, 08:43 AM   #4
dominant
Member
 
Registered: Jan 2004
Posts: 409

Original Poster
Rep: Reputation: 30
mysql is not started automatically (/etc/.rc.d)
 
Old 06-20-2004, 09:06 AM   #5
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282

Rep: Reputation: 61
Quote:
mysql is not started automatically (/etc/.rc.d)
So you just have to issue this command to start mysqld whenever you want :
/usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid --log=/var/lib/mysql/access_log --err-log=/var/lib/mysql/error_log &
Maybe do an alias for it in your ~/.bashrc like :
start_mysql="/usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid --log=/var/lib/mysql/access_log --err-log=/var/lib/mysql/error_log &"
 
Old 06-20-2004, 11:34 PM   #6
datadriven
Member
 
Registered: Jun 2003
Location: Holly Hill, Florida
Distribution: Slackware 10.1
Posts: 317

Rep: Reputation: 30
If I remember correctly there's a file called localhost.err in /var/lib/mysql
 
Old 06-21-2004, 02:02 AM   #7
dominant
Member
 
Registered: Jan 2004
Posts: 409

Original Poster
Rep: Reputation: 30
Thank you for you replies.

I fixed that by putting

log = /path/to/log/mysql.log

in my.cnf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Location of mysql logs? khwang Linux - Newbie 7 12-17-2010 06:51 AM
Help with MySQL logs icarusfall Linux - Software 0 11-14-2005 05:24 PM
MySQL logs, problem chidomen Linux - Newbie 1 03-01-2005 01:35 PM
MYSQL analyze logs mikeshn Programming 0 11-13-2003 03:48 PM
MySQL stores logs? mikeshn Linux - Software 2 09-06-2003 07:21 PM


All times are GMT -5. The time now is 06:19 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration