search

MySQL Logging


Die verschiedenen LogTypen:

Log Type Information Written to Log
Error log Problems encountered starting, running, or stopping mysqld
General query log Established client connections and statements received from clients
Binary log Statements that change data (also used for replication)
Relay log Data changes received from a replication master server
Slow query log Queries that took more than long_query_time seconds to execute

 

Die Mysql config Datei muss wie folgt angepasst werden, damit Logs geschrieben werden (/etc/my.cnf)(http://www.pontikis.net/blog/how-and-when-to-enable-mysql-logs):

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

user=mysql

# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

log-error=/var/log/mysql_error.log

 

log-bin=mysql-bin

 

general_log_file       = /var/log/mysql.log

general_log             = 1

 

log_slow_queries        = /var/log/mysql-slow.log

long_query_time = 2

log-queries-not-using-indexes

 

[mysqld_safe]

log-error=/var/log/mysql_error.log

pid-file=/var/run/mysqld/mysqld.pid

 

mysql-bin Speicherort ist: „/var/lib/MySQL“

Um die Logs beim Start zu aktivieren, muss man sich mit „mysql –u root –p“ bei mysql anmelden und dann folgendes ausführen:

SET GLOBAL general_log = ‘ON’;

SET GLOBAL slow_query_log = ‘ON’;

FLUSH LOGS; Führt zur Neuerstellung des bin Logs.

Schreiben Sie einen Kommentar

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

close
search
Instagram
  • Gsesch dr mond?🌚 #bösfulen und #pfannenstock von der #glärnischhütte aus

#moon #milchstrasse #milkyway #himmelvollersterne #alps #alpen #glarus #glärnisch #switzerland #mountains #sony #alpha7iii #sonya7iii #gmaster1635

F2.8 | 20s | ISO3200
  • Fum Garichtistausee uf Elm🏃‍♂️
#landscape #landschaft #alps #alpen #glarus #wildmad #switzerland #mountains
  • Fo de Rugghubelhütte ufe Uri Rotstock🏃 #cheibäwit 
#switzerland #mountains #alps #engelberg #landscape #hiking
  • Mega schüü abr fascht nöd sträng gsi🌄#wiggis
#sunrise #sonnenaufgang #landscape #landschaft #alps #alpen #glarus #switzerland #mountains #sony #alpha7iii #sonya7iii 
f14 | 1/160 | ISO 100
  • #undallisindampfüsälä #faschtnurichbiwach #tätschgeil
#nicefrance #nizza #morning #street #sea #beforesunrise #streetphotography #sonya7iii #alpha7iii

28mm | f8.0 | ISO 12800 #hankeisstativgha
  • #early_morning #mountains #sunrise

Blablablabla

#tagdeinscheiss #lake #landscape #landschaft #sonnenaufgang #mirrorlake #sony #alpha7iii #sonya7iii #lovethiscamera
  • #prächtig #sunnäundergang #gras #unscharfscharf
.a
.b
.c
#lisdochnödwiter
#landscape #landschaft #sundown #sonnenuntergang #sun #sony #sonya7iii #alpha7iii
  • #schokrass #luegwieschön #road #sunset #grancanaria #hdriphoneographer #schowiderhänderdeseichglässe #hashtaghashtaghashtag
  • #fridlispitz #1vongniceigkeither #dunnschtigischdeneufriitig #werlistdeseichüberhaupt? #glarnerland

Follow Me!

Neueste Kommentare

    Hi, guest!

    settings

    menu

    By continuing to use the site, you agree to the use of cookies. more information

    The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

    Close