Ê×Ò³ | ¹«Ë¾¼ò½é | Êý¾Ý»Ö¸´ | ±¸·Ý·þÎñ | ³É¹¦°¸Àý | ¼¼ÊõÖÐÐÄ | ¿Í»§·þÎñ | ·þÎñ±¨¼Û | Êý¾Ý»Ö¸´Èí¼þ | ÁªÏµÎÒÃÇ | ±±ÑDz©¿Í  
 
  ±±¾©×ܲ¿£º 4006-505-646
  Ìì ½ò ²¿£º 4006-505-646
  ÉÏ º£ ²¿£º 4006-505-646
  Éî ÛÚ ²¿£º 4006-505-646
  ¹ã ÖÝ ²¿£º 4006-505-646
  ÖØ Çì ²¿£º 4006-505-646
  ÄÏ ¾© ²¿£º 4006-505-646
  ÆäËüµØÇø£º 4006-505-646
±±ÑÇÊý¾Ý»Ö¸´Èí¼þWindowsרҵ°æ
ÈýÐÇÊÖ»úÊý¾Ý»Ö¸´Èí¼þV1.0
±±ÑÇÆ»¹ûÊÖ»úÊý¾Ý»Ö¸´Èí¼þV2.0
±±ÑÇÓ²Å̼Ïñ»úÊý¾Ý»Ö¸´Èí¼þ V
±±ÑÇvmwareÐéÄâ»úÊý¾Ý»Ö¸´Èí¼þ
±±ÑÇÕÕƬÊý¾Ý»Ö¸´Èí¼þ
±±ÑÇÉãÏñ»úÊý¾Ý»Ö¸´Èí¼þ v2.1
±±ÑÇSybaseÊý¾Ý¿âÐÞ¸´Èí¼þ V2.
raid´ÅÅÌÕóÁÐÓ¦¼±·½°¸
HP EVA4400/6400/8400/P6000
iphone Í¨Ñ¶Â¼¶ªÊ§ÈçºÎ»Ö¸´£¿
xen server ´æ´¢¿â(sr)Ë𻵺ó
RAID6½á¹¹Ô­ÀíÏê½â£¨±±ÑÇÊý¾Ý
AIXÏÂɾ³ýLVºóµÄÏÖ³¡±£»¤ºÍÊý
RAIDË𻵺ó ¶ÔÊý¾ÝµÄÍêÕû±¸·Ý
Äúµ±Ç°µÄλÖãºÊ×Ò³ >> ¼¼ÊõÖÐÐÄ >> Êý¾Ý¿âÐÞ¸´ÎÄÀ¸ >> ÕýÎÄ

mysql µÄÈÕÖ¾µÄÆô¶¯Óë²é¿´

mysqlÓÐÒÔϼ¸ÖÖÈÕÖ¾£º
´íÎóÈÕÖ¾£º -log-err
²éѯÈÕÖ¾£º -log
Âý²éѯÈÕÖ¾: -log-slow-queries
¸üÐÂÈÕÖ¾: -log-update
¶þ½øÖÆÈÕÖ¾£º -log-bin
Ĭ ÈÏÇé¿öÏ£¬ËùÓÐÈÕÖ¾´´½¨ÓÚmysqldÊý¾ÝĿ¼ÖС£Í¨¹ýË¢ÐÂÈÕÖ¾£¬Äã¿ÉÒÔÇ¿ÖÆ mysqldÀ´¹Ø±ÕºÍÖØдò¿ªÈÕÖ¾Îļþ£¨»òÕßÔÚijЩÇé¿öÏÂÇл»µ½Ò»¸öеÄÈÕÖ¾£©¡£µ±ÄãÖ´ÐÐÒ»¸öFLUSH LOGSÓï¾ä»òÖ´ÐÐmysqladmin flush-logs»òmysqladmin refreshʱ£¬³öÏÖÈÕ־ˢÐÂ
1. ´íÎóÈÕÖ¾
ÓÃ--log- error[=file_name]Ñ¡ÏîÀ´Ö¸¶¨mysqld±£´æ´íÎóÈÕÖ¾ÎļþµÄλÖá£Èç¹ûûÓиø¶¨file_nameÖµ£¬mysqldʹÓôíÎóÈÕÖ¾Ãû host_name.err ²¢ÔÚÊý¾ÝĿ¼ÖÐдÈëÈÕÖ¾Îļþ¡£Èç¹ûÄãÖ´ÐÐFLUSH LOGS£¬´íÎóÈÕÖ¾ÓÃ-oldÖØÐÂÃüÃûºó׺²¢ÇÒmysqld´´½¨Ò»¸öеĿÕÈÕÖ¾Îļþ¡£(Èç¹ûδ¸ø³ö--log-errorÑ¡ÏÔò²»»áÖØÐÂÃüÃû£©¡£
Èç¹û²»Ö¸¶¨--log-error£¬»òÕß(ÔÚWindowsÖÐ)Èç¹ûÄãʹÓÃ--consoleÑ¡Ï´íÎó±»Ð´Èë±ê×¼´íÎóÊä³östderr¡£Í¨³£±ê×¼Êä³öΪÄãµÄÖնˡ£
2. ͨÓòéѯÈÕÖ¾                                                           
ÓÃ--log[=file_name]»ò-l [file_name]Ñ¡ÏîÆô¶¯Ëü¡£Èç¹ûûÓиø¶¨file_nameµÄÖµ£¬Ä¬ÈÏÃûÊÇhost_name.log¡£
3. ÂýËÙ²éѯÈÕÖ¾                                                           
ÓÃ--log-slow-queries[=file_name]Ñ¡ÏîÆô¶¯Ê±£¬mysqld дһ¸ö°üº¬ËùÓÐÖ´ÐÐʱ¼ä³¬¹ýlong_query_timeÃëµÄSQLÓï¾äµÄÈÕÖ¾Îļþ.Èç¹ûûÓиø³öfile_nameÖµ£¬Ä¬ÈÏδÖ÷»úÃû£¬ºó׺Ϊ -slow.log¡£Èç¹û¸ø³öÁËÎļþÃû£¬µ«²»ÊǾø¶Ô·¾¶Ãû£¬ÎļþÔòдÈëÊý¾ÝĿ¼¡£
3. ¸üÐÂÈÕÖ¾                                                             
ÓÃ--log-update[=file_name]Ñ¡ÏîÆô¶¯,²»ÍƼöʹÓÃ.

ÊÇ·ñÆôÓÃÁËÈÕÖ¾
mysql>show variables like 'log_%';
ÔõÑùÖªµÀµ±Ç°µÄÈÕÖ¾
mysql> show master status;
ï@ʾ¶þßMÖÆÈÕÖ¾”µÄ¿
mysql> show master logs;
¿´¶þ½øÖÆÈÕÖ¾ÎļþÓÃmysqlbinlog
shell>mysqlbinlog mail-bin.000001
»òÕßshell>mysqlbinlog mail-bin.000001 | tail
ÔÚÅäÖÃÎļþÖÐÖ¸¶¨logµÄÝ”³öλÖÃ.
Windows£ºWindows µÄÅäÖÃÎļþΪ my.ini£¬Ò»°ãÔÚ MySQL µÄ°²×°Ä¿Â¼Ï»òÕß c:\Windows Ï¡£
Linux£ºLinux µÄÅäÖÃÎļþΪ my.cnf £¬Ò»°ãÔÚ /etc Ï¡£
ÔÚlinuxÏ£º
Sql´úÂë
# ÔÚ[mysqld] ÖÐÝ”Èë
#log
log-error=/usr/local/mysql/log/error.log
log=/usr/local/mysql/log/mysql.log
long_query_time=2
log-slow-queries= /usr/local/mysql/log/slowquery.log
# ÔÚ[mysqld] ÖÐÝ”Èë #log
log-error=/usr/local/mysql/log/error.log
log=/usr/local/mysql/log/mysql.log
long_query_time=2
log-slow-queries= /usr/local/mysql/log/slowquery.log

windowsÏÂ:
Sql´úÂë
# ÔÚ[mysqld] ÖÐÝ”Èë
#log
log-error="E:/PROGRA~1/EASYPH~1.0B1/mysql/logs/error.log"
log="E:/PROGRA~1/EASYPH~1.0B1/mysql/logs/mysql.log"
long_query_time=2
log-slow-queries= "E:/PROGRA~1/EASYPH~1.0B1/mysql/logs/slowquery.log"
# ÔÚ[mysqld] ÖÐÝ”Èë #log
log-error="E:/PROGRA~1/EASYPH~1.0B1/mysql/logs/error.log"
log="E:/PROGRA~1/EASYPH~1.0B1/mysql/logs/mysql.log"
long_query_time=2
log-slow-queries= "E:/PROGRA~1/EASYPH~1.0B1/mysql/logs/slowquery.log"

¿ªÆôÂý²éѯ
long_query_time =2 --ÊÇÖ¸Ö´Ðг¬¹ý¶à¾ÃµÄsql»á±»logÏÂÀ´£¬ÕâÀïÊÇ2Ãë
log-slow-queries= /usr/local/mysql/log/slowquery.log --½«²éѯ·µ»Ø½ÏÂýµÄÓï¾ä½øÐмǼ
log-queries-not-using-indexes = nouseindex.log --¾ÍÊÇ×ÖÃæÒâ˼£¬logÏÂÀ´Ã»ÓÐʹÓÃË÷ÒýµÄquery
log=mylog.log --¶ÔËùÓÐÖ´ÐÐÓï¾ä½øÐмǼ
windowsÏ¿ªÆômysqlÈÕÖ¾£º
ÔÚ[mysql]ϼÓÈëÕâЩ£¨»ù±¾ÉϵÈÓÚ¼ÓÔÚ×îºóÃ棩£º
log-error=
#Enter a name for the query log file. Otherwise a default name will be used.
#×¢:£¨Ð´³ÉtxtÎļþeditplus¿ÉÒÔ¼°Ê±ÖØÔØ,²»¹ýÓÐʱҪ·ÅÔÚCÅÌÏÂeditplus²Å¿ÉÒÔ¼°Ê±ÖØÔØ£©
log= c:/mysql_query.log.txt
#Enter a name for the slow query log file. Otherwise a default name will be used.
log-slow-queries=
#Enter a name for the update log file. Otherwise a default name will be used.
log-update=
#Enter a name for the binary log. Otherwise a default name will be used.
log-bin=

ÉÏһƪ£ºSybaseÖÐbcpµÄÓ÷¨
ÏÂһƪ£ºOracleÍêȫжÔØ
·µ»ØÊ×Ò³ | ÁªÏµÎÒÃÇ | ¹ØÓÚÎÒÃÇ | ÕÐƸÐÅÏ¢ | ÓÑÇéÁ´½Ó | ÍøÕ¾µØͼ | ºÏ×÷»ï°é
°æȨËùÓÐ ±±¾©±±ÑÇå·ÐǿƼ¼ÓÐÏÞ¹«Ë¾
È«¹úͳһ¿Í·þÈÈÏߣº4006-505-646
±±¾©×ܲ¿£º±±¾©Êк£µíÇøÓÀ·á»ùµØ·á»ÛÖз7ºÅвÄÁÏ´´Òµ´óÏÃB×ù205ÊÒ
¾©ICP±¸09039053ºÅ

Ðsmµ