MySQL Logs
Hi,
Can anyone please tell me how to log all activity of my mysql database.
Also do you know if there any tripwire services/products that are available ?
Thanks,
felix001
Junior Poster in Training
65 posts since Dec 2010
Reputation Points: 23
Solved Threads: 0
Set up a general query log. Cf. http://dev.mysql.com/doc/refman/5.0/en/server-logs.html
Locate your configuration file. It's usually called my.cnf and in /etc/mysql.
Locate a log-bin entry in my.cnf or add it, if it's not there.
log-bin = <location of logfile>
Restart the mysql server process.
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254
Thanks. I add this and some different combinations but I am still only logging errors :
[root@william etc]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysql]
log=/var/log/mysql.log
[mysqld_safe]
long_query_time = 1
log-queries-not-using-indexes
root 2424 0.0 0.2 63904 1188 pts/2 S 14:44 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --user=mysql
Can anyone assist ?
felix001
Junior Poster in Training
65 posts since Dec 2010
Reputation Points: 23
Solved Threads: 0