Help with SQL Log

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
nmp
Posts: 18
Joined: Wed Jul 05, 2006 10:09 am

Help with SQL Log

Post by nmp »

I am using Vmware with EZcacti 0.1, with a 10 Gb Virtual machine.
In 4 days the SQL log /var/log became huge, with 8Gb, all the free space left.
How can I solve this problem?

Thnx,
NMP
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

your MySQL server appears to be using "binary logs" : http://mysql.com/doc/refman/4.1/en/binary-log.html

Can you check if you have these lines in /etc/mysql/my.cnf :

Code: Select all

log-bin
server-id = 1
If yes, comment them and restart MySQL (if you can't/don't want to restart MySQL, run "RESET MASTER" at MySQL prompt).
Binary logs will then be removed from /var/lib/mysql
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
nmp
Posts: 18
Joined: Wed Jul 05, 2006 10:09 am

Post by nmp »

I found the file /etc/my.cnf with:

[mysqld]
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

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

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I will try to comment the line with mysql.log, and hope to solve the problem.

Thanks,
NMP
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

nmp wrote:I will try to comment the line with mysql.log, and hope to solve the problem.
I don't think you shoud comment this line...

Can you run this at the MySQL prompt :

Code: Select all

SHOW MASTER STATUS;
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
nmp
Posts: 18
Joined: Wed Jul 05, 2006 10:09 am

Post by nmp »

In mysql:

show master status;

Results:

empty set (0.01 sec)
nmp
Posts: 18
Joined: Wed Jul 05, 2006 10:09 am

Problem with localhost.localdomain.err

Post by nmp »

Now I have problems with the file localhost.localdomain.err.
It becames huge, with 8Gb, all the space left in virtual disk.


NMP
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

What does this log file contains ?

On my system, it contains only MySQL startup and shutdown messages :
060728 13:09:22 InnoDB: Started; log sequence number 0 43709
/usr/sbin/mysqld: ready for connections.
Version: '4.1.20-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-4.1.20
060809 15:34:41 [Note] /usr/sbin/mysqld: Normal shutdown

060809 15:34:41 InnoDB: Starting shutdown...
060809 15:34:44 InnoDB: Shutdown completed; log sequence number 0 43709
060809 15:34:44 [Note] /usr/sbin/mysqld: Shutdown complete

060809 15:34:46 InnoDB: Started; log sequence number 0 43709
/usr/sbin/mysqld: ready for connections.
Version: '4.1.21-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Gentoo Linux mysql-4.1.21
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests