Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26131 - Disable mysqld logging of all queries by default
Summary: Disable mysqld logging of all queries by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-07 09:33 UTC by Martin Mokrejš
Modified: 2003-08-11 03:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2003-08-07 09:33:23 UTC
I'm suprised that by default mysqld logs all queries into a huge file. If that
would be at least in the binlog format ... ;)

Please, apply this patch.



Reproducible: Always
Steps to Reproduce:
1.
2.
3.





--- /etc/mysql/my.cnf.ori       2003-08-07 20:20:06.000000000 +0200
+++ /etc/mysql/my.cnf   2003-08-07 20:32:43.000000000 +0200
@@ -26,7 +26,40 @@
 pid-file       = /var/run/mysqld/mysqld.pid
 socket         = /var/run/mysqld/mysqld.sock
 port           = 3306
-log            = /var/log/mysql/mysql.log
+# If set, mysql logs all queries(general query log). This will be deprecated in
5.0.
+# This logs all queries, even error queries and is slow.
+# log          = /var/log/mysql/mysql.log
+#
+# If you really need logging, use rather binary logging. Specially when
+# doing replication. Read
+# file:/usr/share/doc/mysql-4.0.13-r3/manual.html.gz#Replication
+# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old
+# logs from $hostname-bin.01 up to $hostname-bin.09 while the slave server 
+# is running.
+# Before doing that, check which logfile slave curently uses  by running
+# mysql> SHOW SLAVE STATUS
+# command.
+# To list logfiles on master by do
+# mysql> SHOW MASTER LOGS
+# Then use PURGE for those not needed anymore only! Never remove the files
+# manually!
+#
+# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
+# mysql> RESET MASTER - Deletes all binary logs listed in the index
+#                       file, resetting the binlog index file to be empty.
+# mysql> RESET SLAVE - Makes the slave forget its replication position in
+#                      the master logs.
+# mysql> SET SQL_LOG_BIN=0  - this turns off logging (execute on MASTER only)
+# mysql> SET SQL_LOG_BIN=1  - this turns on logging (execute on MASTER only)
+#
+# log-bin       =/usr/local/mysql/log/jerboas-bin
+# set-variable  = binlog-do-db=non_existant
+# set-variable  = binlog-ignore-db=database_name
+#
+# server-id has to unique for each master or slave in your network,
+# lets use last number from IP address
+# server-id      = 207
+
 basedir                = /usr
 datadir                = /var/lib/mysql
 tmpdir         = /tmp
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 03:41:14 UTC
Fixed in CVS.