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

MySQL Logging – zweifel.org

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
  • Und da gits meh fötäli... Äs hört nümä uf😃 #grifithobservatory #losangeles #LA #night #city #skyline #sunset #sonnenuntergang #nightphotography #california #kalifornien #travel #travelusa #america #usa #roadtrip #sony #alpha7iii #sonya7iii f14 | 20s | ISO 100 f29 | 1/25s | ISO 100
  • Da bini plötzlivh ganz chlii😯 und gsesch s reh? #sequoia #sequoianationalpark #redwood #reh #deer #snow #schnee #california #kalifornien #travel #travelusa #america #usa #roadtrip #sony #alpha7iii #sonya7iii #gmaster1635 f7.1 | 1/60s | ISO 100 f5.6 | 1/80s | ISO 100 f5.6 | 1/40s | ISO 100 f22 | 1/50s | ISO 400
  • Segi warm händs gseit... S hegi kei schnee händs gseit... Chasch ja dängä😜 #yosemite #yosemitenationalpark #snow #schnee #california #kalifornien #car #fordexpedition #travel #travelusa #america #usa #roadtrip #sony #alpha7iii #sonya7iii #gmaster1635 f10 | 1/200s | ISO 1000 f8 | 1/160s | ISO 1000
  • Erstä Halt San Francisco🚗🇺🇲 #travel #travelusa #america #usa #california #kalifornien #roadtrip #blackandwhite #alcatraz #sanfrancisco #wachturm #watchtower #sony #alpha7iii #sonya7iii #gmaster1635 f8 | 1/60s | ISO 100 f5.6 | 1/800s | ISO 100 f8 | 1/40s | ISO 800
  • Lueg en Wasserfall #wasserfall #waterfall #herbst #autumn #alps #alpen #glarus #klöntalersee #klöntal #switzerland #mountains #sony #alpha7iii #sonya7iii #sonygm1635 f22 | 1s | ISO 50
  • Wunderschü am morgä früäh #sunrise #sonnenaufgang #nebel #fog #landscape #landschaft #alps #alpen #glarus #hirzli #switzerland #schweiz #mountains #sony #alpha7iii #sonya7iii #sonygm1635 f22 | 1/25 | ISO 100
  • 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

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