0
Cet article concerne les fichiers de log binaires de MySQL.
Gentoo Base System version 1.6.14 Linux xxxx.ovh.net 2.6.24.5-grsec-xxxx-grs-ipv4-64 #3 SMP Tue May 27 19:09:58 CEST 2008 x86_64 Intel(R) Xeon(R) CPU X3360 @ 2.83GHz GenuineIntel GNU/Linux xxxxxx ~ # cd /var/run/mysqld/ xxxxxx mysqld # ls mysqld-bin.000001 mysqld-bin.000002 mysqld-bin.000003 mysqld-bin.000004 mysqld-bin.index mysqld.pid mysqld.sock xxxxxx mysqld # du -sh 1,2G . xxxxxx mysqld # ls -l total 1158248 -rw-rw---- 1 mysql mysql 646215541 jan 4 09:34 mysqld-bin.000001 -rw-rw---- 1 mysql mysql 1272 jan 4 09:44 mysqld-bin.000002 -rw-rw---- 1 mysql mysql 117 jan 4 09:44 mysqld-bin.000003 -rw-rw---- 1 mysql mysql 538636763 jan 23 17:09 mysqld-bin.000004 -rw-rw---- 1 mysql mysql 136 jan 4 09:44 mysqld-bin.index -rw-rw---- 1 mysql mysql 6 jan 4 09:44 mysqld.pid srwxrwxrwx 1 mysql mysql 0 jan 4 09:44 mysqld.sock
Ou plus simplement :
xxxxxx mysqld # du -h --max-depth=1 /var/run/mysqld 1,2G /var/run/mysqld
Bon, ça pèse lourd. On efface.
xxxxxx mysqld # mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 150653 Server version: 5.0.44-log Gentoo Linux mysql-5.0.44-r2 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> RESET MASTER xxxxxx mysqld # rm mysqld-bin* xxxxxx mysqld # ls mysqld.pid mysqld.sock xxxxxx mysqld # du -sh 8,0K .
On peut meme désactiver : (Il faut les droits SUPER)
xxxxxx run # mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 150832 Server version: 5.0.44-log Gentoo Linux mysql-5.0.44-r2 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SET SQL_LOG_BIN=0 xxxxxx run # /etc/init.d/mysql mysql mysqlmanager xxxxxx run # /etc/init.d/mysql restart * Stopping mysql ... * Stopping mysqld (0) [ ok ] * Starting mysql ... * Starting mysql (/etc/mysql/my.cnf) [ ok ]
DATE 23 Jan 2009