LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-03-2012, 11:06 PM   #1
amolmistry
Member
 
Registered: Nov 2008
Posts: 45

Rep: Reputation: 0
huge mysqld.log file


Hello,

I just found that mysqld.log is consuming more than 200 GB, will this affect to any website if I flush this file.

According to me since this is just log file, it won't affect to any website, correct?

Thanking you,
 
Old 08-03-2012, 11:16 PM   #2
Ch405
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Rep: Reputation: Disabled
It's just a log file, you're okay to flush it. I'd also suggest turning mysql logging off, as it tends to slow down your mysql.

If you want to turn it off, just do this:

Code:
sudo nano /etc/mysql/my.cnf
and comment out the logging directives.

Code:
# general_log_file = /var/log/mysql/mysql.log
# general_log = 1
 
1 members found this post helpful.
Old 08-03-2012, 11:22 PM   #3
amolmistry
Member
 
Registered: Nov 2008
Posts: 45

Original Poster
Rep: Reputation: 0
Thanks Ch405 for your valuable help.
 
Old 08-03-2012, 11:29 PM   #4
Ch405
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Rep: Reputation: Disabled
You are of course welcome. I generally only use mysql logging when I'm installing new software that uses mysql, so I can catch errors. After that it goes back off.
 
Old 08-04-2012, 12:07 AM   #5
amolmistry
Member
 
Registered: Nov 2008
Posts: 45

Original Poster
Rep: Reputation: 0
one more thing, I've also found almost 66 GB files named updates.0000xx under mysql-logs folder, seems those are only update logs, is it safe to delete those as well, or those are required for further update reference?
 
Old 08-04-2012, 12:08 AM   #6
amolmistry
Member
 
Registered: Nov 2008
Posts: 45

Original Poster
Rep: Reputation: 0
and do we possible to prevent creating such files and is it safe?
 
Old 08-04-2012, 12:25 AM   #7
Ch405
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Rep: Reputation: Disabled
I'm not quite confident in my knowledge of mysql to answer if it's safe to dump those files. You'll have to wait until someone else looks in this thread, sorry.
 
Old 08-04-2012, 02:08 AM   #8
amolmistry
Member
 
Registered: Nov 2008
Posts: 45

Original Poster
Rep: Reputation: 0
no problem Ch405, thanks for valuable help so far
 
Old 08-06-2012, 08:33 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As no-one has commented for a few days, try asking over at the mysql forums https://forums.mysql.com/
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
huge log file sang_froid Linux - Server 1 10-23-2009 12:26 PM
Huge log file john_h_grubb Linux - General 2 01-15-2007 02:17 PM
touch: cannot touch `/var/log/mysqld.log': Permission denied massoo Linux - General 1 08-01-2006 01:56 AM
Huge log file grow since "yum update" on 29 April cubensys Fedora 1 05-21-2006 06:34 AM
How to bust up a huge log file safely? sdebiasio Linux - Newbie 2 08-19-2004 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration