½«ÈÕÖ¾ÎļþдÈëMySqLÖÐ
Ê×ÏȽ¨Ò»¸ö¹¤³Ì£¬×¼±¸ºÃÒ»¸ölog4jµÄjar°üºÍÁ¬½ÓMySqLµÄÇý¶¯°ü¡£ÅäÖÃÈçÏ£º
ÐÞ¸Älog4j.propertiesÎļþ£º
######## #´Ë¾äΪ¶¨ÒåÃûΪstdoutµÄÊä³ö¶ËÊÇÄÄÖÖÀàÐÍ£¬¿ÉÒÔÊÇ
#org.apache.log4j.ConsoleAppender£¨¿ØÖÆ̨£©£¬
#org.apache.log4j.FileAppender£¨Îļþ£©£¬
#org.apache.log4j.DailyRollingFileAppender£¨Ã¿Ìì²úÉúÒ»¸öÈÕÖ¾Îļþ£©£¬
#org.apache.log4j.RollingFileAppender£¨Îļþ´óСµ½´ïÖ¸¶¨³ß´çµÄʱºò²úÉúÒ»¸öеÄÎļþ£©
#org.apache.log4j.WriterAppender£¨½«ÈÕÖ¾ÐÅÏ¢ÒÔÁ÷¸ñʽ·¢Ë͵½ÈÎÒâÖ¸¶¨µÄµØ·½£©
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#´Ë¾äΪ¶¨ÒåÃûΪstdoutµÄÊä³ö¶ËµÄlayoutÊÇÄÄÖÖÀàÐÍ£¬¿ÉÒÔÊÇ
#org.apache.log4j.HTMLLayout£¨ÒÔHTML±í¸ñÐÎʽ²¼¾Ö£©£¬
#org.apache.log4j.PatternLayout£¨¿ÉÒÔÁé»îµØÖ¸¶¨²¼¾Öģʽ£©£¬
#org.apache.log4j.SimpleLayout£¨°üº¬ÈÕÖ¾ÐÅÏ¢µÄ¼¶±ðºÍÐÅÏ¢×Ö·û´®£©£¬
#org.apache.log4j.TTCCLayout£¨°üº¬ÈÕÖ¾²úÉúµÄʱ¼ä¡¢Ï̡߳¢Àà±ðµÈµÈÐÅÏ¢£©
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#Èç¹ûʹÓÃpattern²¼¾Ö¾ÍÒªÖ¸¶¨µÄ´òÓ¡ÐÅÏ¢µÄ¾ßÌå¸ñʽConversionPattern£¬´òÓ¡²ÎÊýÈçÏ£º
#%m Êä³ö´úÂëÖÐÖ¸¶¨µÄÏûÏ¢
#%p Êä³öÓÅÏȼ¶£¬¼´DEBUG£¬INFO£¬WARN£¬ERROR£¬FATAL
#%r Êä³ö×ÔÓ¦ÓÃÆô¶¯µ½Êä³ö¸ÃlogÐÅÏ¢ºÄ·ÑµÄºÁÃëÊý
#%c Êä³öËùÊôµÄÀàÄ¿£¬Í¨³£¾ÍÊÇËùÔÚÀàµÄÈ«Ãû
#%t Êä³ö²úÉú¸ÃÈÕ־ʼþµÄÏß³ÌÃû
#%n Êä³öÒ»¸ö»Ø³µ»»Ðзû£¬Windowsƽ̨Ϊ“rn”£¬Unixƽ̨Ϊ“n”
#%d Êä³öÈÕ־ʱ¼äµãµÄÈÕÆÚ»òʱ¼ä£¬Ä¬ÈϸñʽΪISO8601£¬Ò²¿ÉÒÔÔÚÆäºóÖ¸¶¨¸ñʽ
#±ÈÈ磺%d{yyyy MMM dd HH:mm:ss,SSS} Êä³öÀàËÆ£º2002Äê10ÔÂ18ÈÕ 22£º10£º28£¬921
#%l Êä³öÈÕ־ʼþµÄ·¢ÉúλÖ㬰üÀ¨ÀàÄ¿Ãû¡¢·¢ÉúµÄỊ̈߳¬ÒÔ¼°ÔÚ´úÂëÖеÄÐÐÊý¡£
#[Log4JDemo]ÊÇlogÐÅÏ¢µÄ¿ªÍ·£¬¿ÉÒÔΪÈÎÒâ×Ö·û£¬Ò»°ãΪÏîÄ¿¼ò³Æ¡£
#log4j.appender.stdout.layout.ConversionPattern=[Log4JDemo] %p [%t] %C.%M(%L) | %m%n
log4j.rootLogger=DEBUG,DATABASE
log4j.addivity.org.apache=true
########################
# JDBC Appender
#######################
log4j.appender.DATABASE=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.DATABASE.layout=org.apache.log4j.PatternLayout
log4j.appender.DATABASE.URL=jdbc:mysql://127.0.0.1:3306/logdb?characterEncoding=utf8
log4j.appender.
Ïà¹ØÎĵµ£º
¶ÔÓÚÖеȼ¶±ðÒµÎñÁ¿µÄϵͳÀ´Ëµ£¬±¸·Ý²ßÂÔ¿ÉÒÔÕâô¶¨£ºµÚÒ»´ÎÈ«Á¿±¸·Ý£¬Ã¿ÌìÒ»´ÎÔöÁ¿±¸·Ý£¬Ã¿ÖÜÔÙ×öÒ»´ÎÈ«Á¿±¸·Ý£¬Èç´ËÒ»Ö±Öظ´¡£¶ø¶ÔÓÚÖØÒªµÄÇÒ·±Ã¦µÄϵͳ À´Ëµ£¬Ôò¿ÉÄÜÐèҪÿÌìÒ»´ÎÈ«Á¿±¸·Ý£¬Ã¿Ð¡Ê±Ò»´ÎÔöÁ¿±¸·Ý£¬ÉõÖÁ¸üƵ·±¡£ÎªÁ˲»Ó°ÏìÏßÉÏÒµÎñ£¬ÊµÏÖÔÚÏß±¸·Ý£¬²¢ÇÒÄÜÔöÁ¿±¸·Ý£¬×îºÃµÄ°ì·¨¾ÍÊDzÉÓÃÖ÷´Ó¸´ÖÆ»ú ÖÆ(replica ......
¡¡MySQLÊÇÒ»¸öÕæÕýµÄ¶àÓû§¡¢¶àÏß³ÌSQLÊý¾Ý¿â·þÎñÆ÷¡£MySQLÊÇÒÔÒ»¸ö¿Í»§»ú/·þÎñÆ÷½á¹¹µÄʵÏÖ£¬ËüÓÉÒ»¸ö·þÎñÆ÷ÊØ»¤³ÌÐòmysqldºÍºÜ¶à²»Í¬µÄ¿Í»§³ÌÐòºÍ¿â×é³É¡£ÓÉÓÚÆäÔ´ÂëµÄ¿ª·ÅÐÔ¼°Îȶ¨ÐÔ£¬ÇÒÓëÍøÕ¾Á÷ÐÐ±à »ÓïÑ PHPµÄÍêÃÀ½áºÏ£¬ÏÖÔںܶàÕ¾µã¶¼ÀûÓÃÆäµ±×÷ºó¶ËÊý¾Ý¿â£¬Ê¹Æä»ñµÃÁ˹㷺ӦÓᣴ¦ÓÚ°²È«·½ÃæµÄ¿¼ÂÇ£¬ÐèҪΪÿһÓû§¸ ......
MySQLµÄÊý¾Ý±íÀàÐͺܶ࣬MySQLÒ»¹²ÏòÓû§ÌṩÁË°üÀ¨DBD¡¢HEAP¡¢ISAM¡¢MERGE¡¢MyIAS¡¢InnoDBÒÔ¼°GemeniÕâ7ÖÖ±í¡£ÆäÖÐDBD¡¢InnoDBÊôÓÚÊÂÎñ°²È«Àà±í£¬¶øÆäËûÊôÓÚÊÂÎñ·Ç°²È«Àà±í¡£
DBD
Berkeley DB(DBD)±íÊÇÖ§³ÖÊÂÎñ´¦ÀíµÄ±í£¬ÓÉSleepycatÈí¼þ¹«Ë¾¿ª·¢¡£ËüÌṩMySQLÓû§ÆÚ´ýÒѾõŦÄÜ--ÊÂÎñ¿ØÖÆ¡£ÊÂÎñ¿ØÖÆÔÚÈκÎÊý¾Ý¿âϵͳÖÐ ......
Ô´µØÖ·: http://www.pcppc.cn/shujuku/mysql/shujuku_163919.html
ÄúÕýÔÚ¿´µÄMySQL½Ì³ÌÊÇ:MySQLÊý¾Ý¿âѧϰ±Ê¼Ç¡£
¡¡¡¡MySQLÊý¾Ý¿âѧϰ±Ê¼Ç
(ʵÑé»·¾³:Redhat9.0,MySQL3.23.54)
¸ÙÒª£º
Ò»£¬Á¬½ÓMySQL
¶þ£¬MySQL¹ÜÀíÓëÊÚȨ
Èý£¬Êý¾Ý¿â¼òµ¥²Ù×÷
ËÄ, ......
×¼±¸¹¤×÷£º
°²×°tomcat5.5£¨×¢ÒâÕâµã£©
°²×°mysql
¿½±´mysqlÇý¶¯µ½tomcat_home/common/libÏÂ
н¨Ò»¸öweb¹¤³Ì
ÔÚ¹¤³ÌÖмÓÈëindex.jsp
<%@page import="java.util.*,javax.naming.*,java.sql.*,javax.sql.*" %>
<%@page contentType="text/html;charset=BIG5"%>
<% ......