rss
twitter
  • Showcase
  • Carrières
  • Support
  • GitLab
  • Espace client
  • Contact

MySQL et les logs *bin

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
by : Germain
Author / Auteur

Social Share / Partager

    Leave a Reply / Répondre Annuler la réponse

    *
    *

    More in Back-end : SQL, MySQL

    • Afficher les logs MySQL
    • Changer l'interclassement de plusieurs tables MySQL à la fois (ou presque
    • Connexion distante à PostgreSQL 9.3 via tunnel SSH
    • Synchroniser 2 serveurs MySQL rapidement
    • Sauvegardes MySQL et rotations avec AutoMySQLBackup

    Search the blog

    Blog categories

    • Front-end : HTML, CSS (13)
    • Workflow (1)
    • Front-end : javascript, jQuery (33)
    • Back-end : PHP, CMS (42)
    • Back-end : SQL, MySQL (20)
    • Sysadmin : Linux, Apache, GIT (75)
    • Designers : tools, advice (2)
    • Desktop : OS X (37)
    • Desktop : Microsoft (12)
    • Uncategorized (8)

    ITALIC™ Resources

    • Paramètres de connexion au serveur mail
    • Graphistes : séduire un développeur web
    • Dév front : nos bonnes pratiques
    • Mailing : nos (bonnes ?) pratiques
    • Environnement de travail Mac

    Recent posts

    • Autoriser le chargement de contenus mixtes non-https dans Chrome (Mac)
    • Afficher les logs MySQL
    • Recevoir un mail lors de la connexion root à un serveur
    • Changer l’interclassement de plusieurs tables MySQL à la fois (ou presque
    • Maildev : tester l’envoi de mails durant ses développements
    © 2008-2017 ITALIC™ • 8 bis rue Abel • 75012 PARIS • Tel +33 (0)1 48 44 46 35 • RCS PARIS 508 228 772 • Powered by WordPress & GoodLayers
    Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site web.
    Cookie settingsACCEPTER
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Toujours activé
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    Enregistrer & appliquer