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
  • #traumtag😍 
Besser hets nüd chänä sii👌

#mountains #mitstigisäundpickel #sanbernardino #zapporthorn #graubünden #switzerland #alps #ski #skitour #skitouring #snowymountains
  • Wienacht am Meer😍🎅🎄 #sunset #sonnenuntergang #sea #meer #sommervibes #christmas #roadtrip #roadtripusa #travel #traveler #travelusa #america #usa #nature #photography #sony #alpha7iii #sonya7iii #gmaster1635 
f22 | 1/50s | ISO 100
  • Nei dr Wald brännt nüd🔥

#sunset #sonnenuntergang #lake #forest #nature #photography #longtimeexposure #louisiana #lafayette #roadtrip #roadtripusa #travel #travelusa #america #usa #sony #alpha7iii #sonya7iii

f25 | 3.5s | ISO 50
#hanhaltkeindfilter #hätaberaufunktioniert
  • Lüäg än Aff👀

#houston #texas #zoo #houstonzoo #affe #dschungel #ape #roadtrip #roadtripusa #travel #travelusa #america #usa #sony #alpha7iii #sonya7iii #gmaster1635

f5.6 | 1/250s | ISO 1000
  • Au bi dem grossä Loch im Bodä hämmer halt gmacht.

#grandcanyon #grandcanyonsouthrim #grandcanyonvillage #nationalpark #arizona #arizona #nightphotography #night #nightsky #astrophotography #roadtrip #roadtripusa #travel #travelusa #america #usa #sony #alpha7iii #sonya7iii #gmaster1635 
f2.8 | 1/1600s | ISO 100
f2.8 | 25s | ISO 6400
  • Ufem wäg zum grand canyon🚗

#monumemtvalley #street #road #threesisters #monuments #arizona #utah #roadtrip #roadtripusa #travel #travelusa #america #usa #sony #alpha7iii #sonya7iii #gmaster1635 
f18 | 1/60s | ISO 100
f8 | 1/200s | ISO 100
  • Sunnä wo bisch?☀ Zum glügg simmer nüd im Summer underwägs suscht wered mer 100tusig lüt is bild gloffä.

#arches #archesnationalpark #utah #stone #delicatearch #balancedrock #sun #sunset #suninthearch #roadtrip #roadtripusa #travel #travelusa #america #usa #sony #alpha7iii #sonya7iii #gmaster1635 
f22 | 1/40s | ISO 100
f22 | 1/6s | ISO 100
f22 | 1/60s | ISO 250
⬆
#interessiertdochehkeinen
  • Sternä und nuch meh sternä eigentlich ganz vill sternä😍⭐ #nightphotography #night #milkyway #photography #skyfullofstars #astrophotography #zionnationalpark #mountains #utah #roadtrip #roadtripusa #travel #travelusa #america #usa #sony #alpha7iii #sonya7iii #gmaster1635

f2.8 | 30s | ISO 3200
  • Au im Winter mega schüü🌞

#zionnationalpark #steinmann #landscape #angelslanding #river #sun #car #fordexpedition #road #utah #visitutah #roadtrip #roadtripusa #travel #travelusa #america #usa #photography #sonyphotography #sony #alpha7iii #sonya7iii #gmaster1635 
f9 | 1/100s | ISO 100
f8 | 1/80s | ISO 500
f22 | 1/20s | ISO 100
f8 | 1/200s | ISO 100
f20 | 1/80s | ISO 250

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