ÐÞ¸ÄMySQL 5.1 dataÎļþ¼Ð·¾¶
ÐÞ¸ÄMySQL 5.1 dataÎļþ¼Ð·¾¶
ÎÒ°²×°µÄÕâ¸ö°æ±¾µÄMYSQLûÓÐdataÎļþ¼Ð£¬µ«ÊÇ¿ÉÒÔÕý³£Ê¹Ó㬲»ÖªµÀÄãÃǵÄÓÐûÓÐÄØ£¿Ôõô²Å¿ÉÒÔ³öÏÖdataÎļþ¼ÐÄØ£¬Ã»ÓÐdataÎļþ¼Ð£¬ÄÇÎÒµÄÊý¾Ý¿âÎļþ´æ·ÅÔÚʲôµØ·½ÁËÄØ£¿ÎÒËÑË÷ÁËÕû¸öµçÄÔ¶¼Ã»ÓÐÕÒµ½¡£
ºÃÐĵÄÅóÓÑ£¬¿ì¸æËßÎÒÔõô»ØÊ£¿¸ÃÔõô½â¾ö£¿
ллÁË£¡£¡£¡
=====================================================================
¿ÉÒԲ鿴mysqlÎļþĿ¼my.iniÎļþ£¬¿ÉÒÔÕÒµ½ÀàËÆÓÚ
datadir="D:/beeagle/Program Files/MySQL/MySQL Server 5.0/Data/"µÄ×ֶΠ¸Ã·¾¶Îªmysql dataĿ¼
ĬÈÏÔÚ£º"C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\Data\"
×¢Ò⣺Application DataÎļþ¼ÐÊÇÒþ²ØµÄ£¡£¡£¡
¿ÉÒÔÐÞ¸ÄÉÏÊöÅäÖ㬰ÑDataÎļþ¼Ð·ÅÔÚÄãÏë·ÅµÄµØ·½¡£
---Ð޸ķ½Ê½ÈçÏ£º
1.Í£Ö¹mysql£¬ÔÚÃüÁî´°¿ÚÖÐÊäÈë²¢ÔËÐУºnet stop mysql
¼´¿É£»
2.°Ñ"C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\Data\" ÀïµÄDataÎļþ¼Ð¼ôÇе½Ä¿µÄµØ¡£±¾ÈË°ÑËü·Åµ½ÁË"D:\PHP\MySQL\MySQL Server 5.1"Ŀ¼Ï£¨¸úmysql·Åµ½ÁËÒ»Æ𣩣¬²¢ÇÒ°ÑĿ¼"C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\"ɾ³ýµô¡£
3.ÐÞ¸Ämy.iniÎļþ£¬°Ñdatadir¸Ä³É datadir="D:\PHP\MySQL\MySQL Server 5.1\data\"
4.Æô¶¯mysql,ÔÚÃüÁî´°¿ÚÖÐÊäÈë²¢ÔËÐУºnet start mysql ¼´¿É£»
5.ÐÞ¸ÄÍê±Ï£¬ÒÔºó¾Í¿ÉÒÔ°ÑÏàÓ¦µÄÊý¾Ý¿â¸½¼Ó¶ÔÏó¿½±´µ½ÀïÃæÀ´¡£
Ïà¹ØÎĵµ£º
http://immike.net/blog/2007/04/09/how-not-to-optimize-a-mysql-query/
ÕâƪÎÄÕ½¨Ò飺
£¨1£©²»ÒªÊ¹ÓÃһЩmysqlµÄtip£¬È磺SQL_SMALL_RESULT, HIGH/LOW_PRIORITY, and INSERT DELAYED£¬STRAIGHT_JOIN£¬³ý·ÇûÓÐÆäËû·½·¨£¬ÒòΪÕâÑùʧȥÁËSQLµÄ¿ÉÒÆÖ²ÐÔ
£¨2£©Êʵ±¶Ô±í½øÐÐË÷Òý
£¨3£©±ÜÃâ¶Ô²»±ØÒªÊý¾ÝµÄ²éѯ
£¨4£©´¦Àí× ......
http://www.mysqlperformanceblog.com/2006/11/12/trying-archive-storage-engine/
£¨1£©ÔÚÏàͬµÄÌõ¼þÏ£¬archiveµÄÊý¾Ý´óСԶСÓÚmyisam
£¨2£©ÔÚѹËõarchiveÊý¾Ýʱ£¬bzip2ºÃÓÚgzip
£¨3£©ÐèÒªÌí¼ÓarchiveµÄ·½·¨ºÍѹËõµÄlevel£¬ÒÔÂú×㲻ͬÓû§µÄÐèÇó
£¨4£©Õâ¸ö´æ´¢ÒýÇæÊÊÓÃÓÚÈÕÖ¾Êý¾Ý
£¨5£©´ËÒýÇæ²»ÄÜupdate,delete£¬²¢ ......
MYSQL 8Сʱ ¶Ï¿ªÁ´½ÓÎÊÌâ
½â¾ö°ì·¨ÓÐÁ½¸ö£ºµÚÒ»ÊÇÉèÖÃautoReconnectÊôÐÔÉèÖÃΪtrue£»µÚ¶þÊÇÉèÖÃDBCP ʱ½«testqueryµÈ¼¸¸öÊôÐÔÒ»²¢ÉèÖá£
ÎÊÌâµÄÔÒòÊÇ£¬MySQLµÄ²ÎÊýinteractive_timeout£¬Ò²¾ÍÊǽ»»¥³¬Ê±Ê±¼äĬÈÏΪ8Сʱ¡£Ò²¾ÍÊÇÈç¹ûÒ»¸öÁ´½ÓÔÚ8Сʱºó£¬»¹Ã»ÓкͷþÎñÆ÷½»»¥£¬Õâ¸öÁ¬½Ó¾Í»á±»MySQL·þÎñÆ÷¶Ï¿ª¡£ÒòΪMySQLÄÜ ......
ÓÉMySQLÌṩµÄģʽƥÅäµÄÆäËûÀàÐÍÊÇʹÓÃÀ©Õ¹ÕýÔò±í´ïʽ¡£µ±Äã¶ÔÕâÀàģʽ½øÐÐÆ¥Åä²âÊÔʱ£¬Ê¹ÓÃREGEXPºÍNOT REGEXP²Ù×÷·û(»òRLIKEºÍNOT RLIKE£¬ËüÃÇÊÇͬÒå´Ê)¡£ À©Õ¹ÕýÔò±í´ïʽµÄһЩ×Ö·ûÊÇ£º
“.”Æ¥ÅäÈκε¥¸öµÄ×Ö·û¡£
Ò»¸ö×Ö·ûÀà“[...]”Æ¥ÅäÔÚ·½À¨ºÅÄÚµÄÈκÎ×Ö·û¡£ÀýÈ磬“[abc]”ƥŠ......
Ê×ÏÈ£¬ÒªÏÂÔØÒ»¸öÁ¬½ÓmysqlÊý¾Ý¿âµÄÇý¶¯³ÌÐò: mysql-connector-java-3.0.15-ga-bin.jar, Õâ¸öÇý¶¯³ÌÐò²»ÐèÒª×öÆäËüÅäÖÃ,Ò²¾ÍÊÇ˵£¬¶ÔÓÚmysqlÊý¾Ý¿â£¬²»±ØÏñaccess»òÕßoracleÒª½¨Á¢odbcÊý¾ÝÔ´¡£
Æä´Î£¬½«ÉÏÃæµÄ.jarÎļþ¼ÓÈëµ½classpath»·¾³±äÁ¿ÖС£
×îºó£¬¾ÍÊÇд´úÂë½øÐвâÊÔÁË¡£
Ö÷Òª´úÂëÈçÏ£º
......