Mysql logging in Solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Mysql logging in Solaris
# 1  
Old 09-07-2007
Computer Mysql logging in Solaris

Folks;
i have mysql installed on Solaris box (sparc).
The problem is under /opt/mysql/data directory, there's a log file that grows very fast & becomes a huge size.
Is there a way to stop the logging under the data directory so i don't have the issue of running out of space?

Your help will be a greatly appreciated.
# 2  
Old 09-07-2007
Sure. There are several kinds of log files used by mysql and you need to know the exact kind of log file in order to have the correct directive placed in the mysql configuration (my.cnf) to control log behaviour.

A list of options:
MySQL AB :: MySQL 5.0 Reference Manual :: 5.2.1 Option and Variable Reference

Say "log-bin" refers to binary log. On many systems it is enabled by default. There are other kinds of log files.

Of course, making the log file a symbolic link to /dev/null may work. It just ain't that pretty.
# 3  
Old 09-07-2007
Thanks, but i still have issues:
1. The list you sent me is big & i'm not sure which is which.

2. under /data i see three log files:
ib_logfile0,
ib_logfile1
server_name.log

Server_name.log is the one who's growing so big and i don't what type of log file is it?

You mentioned something about directing this log file to /dev/null, would that keep the log file from getting so big or only will move the file content somewhere else?
# 4  
Old 09-07-2007
MySQL AB :: MySQL 5.0 Reference Manual :: 5.11.2 The General Query Log

You should find out why the general query log is enabled. It is disabled by default so probably some of your init scripts call it with the --log option. If that is the case, disabling it in the my.cnf may probably not work and you have to remove it from the script. But first check my.cnf then.

/dev/null points to the black hole. Anything written to it is simply discarded and will not take space, because they are gone.
# 5  
Old 09-08-2007
Thanks but the issue is i don't have my.cnf, i have these:
my-large.cnf
my-medium.cnf
my-small.cnf

plus (execuse me for being that way as i'm not familiar with myswl) i don't know which init script i can find this in
# 6  
Old 09-08-2007
- Not sure where are you searching configuration file;you may find my.cnf in /etc directory.
- may be the init script would be /etc/init.d/mysql

-ilan
# 7  
Old 09-08-2007
How is your mysql started? From an init script, by hand? I don't use Solaris so you are expected to know how is mysql started on your system. If mysql is started from some init script and there is the '--log' switch given on the command, remove it. Either way, make sure the '--log' option has not been specified anywhere.

You should do some reading about how mysql is configured as there are so many ways to configure mysql and it is impossible for us here to know exactly the configuration of yours. But I know that due to size, this query log is not on by default, so if it is on on your system, that means the option must have been specified somewhere. Do a search on it.

MySQL AB :: MySQL 5.0 Reference Manual :: 4.3 Specifying Program Options
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Connection Logging in Solaris 10 & 11 - Beginner

Excuse my ignorance as I am very new to working with Solaris. I'm looking for documentation on how to create a network log in Solaris 10 & 11. I don't wish to edit any of the logs currently the system. I simply want a log that will capture all incoming IP addresses and log them with a time-in... (8 Replies)
Discussion started by: FamousAv8er
8 Replies

2. Solaris

Solaris 10 Not Logging Anything

Hello, It would appear that my server is no longer logging anything. Last time anything was written to /var/adm/messages and /var/log/syslog was Aug 26 2010. I was told there was a storm and the power went out or something around that time, but there were never any problems. I've tried... (11 Replies)
Discussion started by: gadonj18
11 Replies

3. Solaris

Solaris 2.6 failed login logging

Holla! Sorry to spam the board with all my Solaris 2.6 questions (I just found this forum). My most recent problem is that not ALL failed log-ins are getting logged in /var/log/authlog. It seems to work fine for the "su" command from a non-root user, but the actual "login" command or a desktop... (4 Replies)
Discussion started by: rrossorr
4 Replies

4. Solaris

How to enable logging in Solaris 10?

hi all, i want to log every thing happen in my server is any body can provide me with articals, pdf's is that correct to log every thing in the system what is the most important thing i should i log it (4 Replies)
Discussion started by: corvinusbsd
4 Replies

5. UNIX for Advanced & Expert Users

Solaris auditing (file access logging) for specific directory only.

Hello, We need to log the operations that specific user on Solaris 10 (SPARC) is performing on one directory and it's contents. I was able to configure solaris auditing service (auditd) and it works fine. The only problem is that auditd logs huge amount of unneeded information. We need to log... (0 Replies)
Discussion started by: +Yan
0 Replies

6. Solaris

logging incoming connections on solaris 10

i've been able to log incoming telnet and ssh connections on solaris 9 using the following lines in /etc/syslog.conf # Telnet connections are logged to auth.notice auth.notice /var/adm/authlog # An entry in /etc/profile logs all telnet connections... (2 Replies)
Discussion started by: soliberus
2 Replies

7. Solaris

Xferlog in solaris (FTP logging)

HI all, i Have a requirement for my customer fro tracking the ftp user sessions details. After some google search i got to know i need to confgure xferlog for the same.Want to know how to start the xferlog in solaris 10. Please help me :( (2 Replies)
Discussion started by: rgrandhi
2 Replies

8. Solaris

Logging Connections in Solaris

Hi All, Is there a built in function/tool in Solaris that enables creation of a history file on any connection (via telnet, ssh, rsh or nfs) to Solaris machine? I would like to create a script that records IP Address, date and timestamp, and command excuted for any connection to a Solaris... (2 Replies)
Discussion started by: racbern
2 Replies

9. Solaris

Solaris 10 freezes up while logging in.....!!!!

Hi all, I have installed Solaris along with Xp ....The installation was successful... I get the Grub menu displaying Solaris along with Win Xp....After i select Solaris the following happens, "Failed to initialize inband hotplug controller" The above message repeats three times & i get the... (2 Replies)
Discussion started by: codewarrior
2 Replies

10. Solaris

logging solaris 10 tcp-wrappers

I want to log tcp-wrapper events Solaris 10. I researched and saw that I could make a syslog entry in the hosts.deny, which I did below. After restarting syslog and having ssh blocking, I see nothing logging. I also do not get the email that should be generated. The file was taken from a... (2 Replies)
Discussion started by: csgonan
2 Replies
Login or Register to Ask a Question