Mysql¿ªÆôÈÕÖ¾
ÔÎÄת×Ô:http://hi.baidu.com/jackli00/blog/item/21b2e242025bfa1473f05d24.html
Mysql¿ªÆôÈÕÖ¾
2008-11-18 11:23
ÊÇ·ñÆôÓÃÁËÈÕÖ¾
mysql>show variables like 'log_bin';
ÔõÑùÖªµÀµ±Ç°µÄÈÕÖ¾
mysql> show master status;
¿´¶þ½øÖÆÈÕÖ¾ÎļþÓÃmysqlbinlog
shell>mysqlbinlog mail-bin.000001(Ҫд¾ø¶ÔÎÊÌâ·¾¶¡¡d://)
»òÕßshell>mysqlbinlog mail-bin.000001 | tail
Windows ÏÂÓÃÀàËÆµÄÃüÁî¡£
mysqlÓÐÒÔϼ¸ÖÖÈÕÖ¾£º
´íÎóÈÕÖ¾£º -log-err
²éѯÈÕÖ¾£º -log
Âý²éѯÈÕÖ¾: -log-slow-queries
¸üÐÂÈÕÖ¾: -log-update
¶þ½øÖÆÈÕÖ¾£º -log-bin
ÔÚmysqlµÄ°²×°Ä¿Â¼Ï£¬´ò¿ªmy.ini,ÔÚºóÃæ¼ÓÉÏÉÏÃæµÄ²ÎÊý£¬±£´æºóÖØÆômysql·þÎñ¾ÍÐÐÁË¡£
ÀýÈ磺
#Enter a name for the error log file. Otherwise a default name will be used.
log-error=err.log
#Enter a name for the query log file. Otherwise a default name will be used.
#log=
#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=
ÉÏÃæÖ»¿ªÆôÁË´íÎóÈÕÖ¾£¬Òª¿ªÆäËûµÄÈÕÖ¾¾Í°ÑÇ°ÃæµÄ“#”È¥µô¡£
long_query_time =1 --ÊÇÖ¸Ö´Ðг¬¹ý¶à¾ÃµÄsql»á±»logÏÂÀ´£¬ÕâÀïÊÇ1Ãë
log-slow-queries=slowqueris.log --½«²éѯ·µ»Ø½ÏÂýµÄÓï¾ä½øÐмǼ
log-queries-not-using-indexes = nouseindex.log --¾ÍÊÇ×ÖÃæÒâ˼£¬logÏÂÀ´Ã»ÓÐʹÓÃË÷ÒýµÄquery
log=mylog.log --¶ÔËùÓÐÖ´ÐÐÓï¾ä½øÐмǼ
log-error=log-error.log
log=log-query.log
log-queries-not-using-indexes
log-warnings=2
log-slow-queries=log-slow-query.log
log-update=log-update.log
long_qu
Ïà¹ØÎĵµ£º
¾Ý¹úÍâýÌ屨µÀ£¬MySQLÊý¾Ý¿âµÄ¿ª·¢ÕßMichael WideniusÒÔ¼°²¿·ÖÏà¹ØÈËÊ¿½üÈÕÏòÅ·ÖÞ¡¢ÖйúÓë¶íÂÞ˹µÄ¼à¹Ü»ú¹¹Ìá½»Á˶Լ׹ÇÎÄ-Sun½»Ò׵ķ´¶ÔÒâ¼û£¬ÓдóÔ¼14000ÈËÔÚ¸ÃÒâ¼ûÉÏÇ©×Ö±íʾËûÃǶԴËÊÕ¹ºµÄ·´¶Ô¡£Å·ÃËίԱ»á´ËÇ°Ôø·´¶Ô¼×¹ÇÎÄÊÕ¹ºSun£¬µ«Õâһ¢¶ÏÉó²é»ú¹¹ÔÚ12ÔÂÓֳƣ¬¶Ô´Ë½»Ò×´ï³ÉÒ»¸öÂúÒâµÄ½á¹û±íʾÀÖ¹Û¡£Å·ÃËίԱ»á½«Ô ......
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
//===========================================
// ³ÌÐò£º mysql-Based Session Class
// ¹¦ÄÜ£º »ùÓÚmysql´æ´¢µÄ Session ¹¦ÄÜÀà
// ×÷Õß: yejr
// ÍøÕ¾: http://imysql.cn
// ʱ¼ä: 2007- ......
1.´´½¨Ò»¸öjava projectÏîÄ¿pooling
2.ΪÏîÄ¿Ìí¼ÓMySQLÁ¬½ÓÇý¶¯
3.ΪÏîÄ¿Ìí¼ÓÒ»¸öÅäÖÃÎļþdbpool.proprerties
Code
driverClassName=com.mysql.jdbc.Driver
username=root
password=
url=jdbc:mysql://localhost:3306/work
poolSize=10
4.·Ö±ð´´½¨Ò»¸öÁ¬½ÓÀàConnectionPool.javaºÍÒ»¸ö²âÊÔÀàConnectionPoo ......
1 innochecksum
5 msql2mysql
6 myisamchk
7 myisam_ftdump
8 myisamlog
9 &nbs ......
conn.php
<?php
/*
* Created on 2010-1-6
* Author:CHAUVET
* Function:Á¬½Ó×Ö·û´®
*/
$conn=@mysql_connect("localhost","root","")or die("Á¬½ÓÊý¾Ý¿â³ö´í£¡");
mysql_select_db("newdb",$conn);
mysql_query("set names 'gb2312'");
function ReplaceSom ......