Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʵÏÖwin2003ÏÂmysqlÊý¾Ý¿âÿÌì×Ô¶¯±¸·Ý

ÖÕÓÚÈ÷þÎñÆ÷ÿÌìÔçÉϱ¸·ÝÒ»´Î MySQL Êý¾Ý¿â²¢×Ô¶¯´ò°ü,ͬʱɾ³ý 5 ÌìǰµÄ±¸·ÝÎļþ. ·ÖÏíÈçÏÂ.
1. »·¾³: windows server 2003 + Apache 2.0 + PHP5 + MySQL 4.0.26 .
2. ¼ÙÉè PHP °²×°Ä¿Â¼Îª D:/php ,MySQL °²×°Ä¿Â¼Îª D:/mysql.
3. ÔÚ D:/php Ͻ¨Á¢Ä¿Â¼ WinRAR, °ÑÄã winrar °²×°Ä¿Â¼Ï嵀 WinRAR.exe ºÍ RARReg.KEY ¸´ÖƵ½ D:/php/WinRAR .
4. D:/php Ͻ¨Á¢Îļþ mysql_backup.php:
/*/////////////////////////
#FileName: mysql_backup.php
#Author: faisun
#Website: http://www.softpure.com
////////////////////////*/
//±£´æÄ¿Â¼,·¾¶ÒªÓ÷´Ð±¸Ü.ÄúÐèÒªÊÖ¶¯½¨Á¢Ëü.
$store_folder = 'D:databse_backup'; //Óû§ÃûºÍÃÜÂë
//¸ÃÕʺÅÐëÓвÙ×÷[ËùÓÐ]µÄÊý¾Ý¿â¼°FILEµÄȨÏÞ
//·ñÔòÓÐЩÊý¾Ý¿â²»Äܱ¸·Ý.
$db_username = "root";
$db_password = ""; $time=time(); $nowdir = "$store_folder".date("Ymd",$time)."";
if(file_exists("$nowdir.rar")) die("File exists.n");
@mkdir($nowdir); mysql_connect("localhost","$db_username","$db_password");
$query=mysql_list_dbs(); while($result=mysql_fetch_array($query)){
system (dirname(__FILE__).'..mysqlbinmysqldump --opt '."$result[Database] -u ".($db_password?"-p":"")." > $nowdir$result[Database].sql");
echo "dumping database `$result[Database]`...n";
}
echo "nWinrar loading...n"; system( dirname(__FILE__)."WinRARWinRAR.exe a -ep1 -r -o+ -m5 -df "$nowdir.rar" "$nowdir" " ); //ɾ³ý 5 ÌìǰµÄÎļþ
@unlink("$store_folder".date("Ymd",$time-86400*5).".rar"); echo "nOK!n"; >
5. D:/php Ͻ¨Á¢Îļþ mysql_backup.bat,ÄÚÈÝÖ»ÓÐÒ»¾ä:
php.exe mysql_backup.php
6. Ë«»÷¸Ã bat ÎļþÔËÐÐ,Èç¹ûÄܱ¸·ÝÁË,OK,ÏÂÒ»²½Ìí¼ÓÈÎÎñ¼Æ»®.
7. °Ñ D:/php/mysql_backup Ìí¼Óµ½ÈÎÎñ¼Æ»®,ʱ¼äѡÿÌì. ¸ù¾Ý·þÎñÆ÷µÄ¼à²â½á¹û,ÿÌìÔçÉÏ 5-8 ʱΪÁ÷Á¿µÍ·åÆÚ. ÓÉÓÚ 5-7 ʱÓÐЩÊý¾Ý¿âµÄÇåÀí¹¤×÷,ÎÒ°Ñʱ¼ä¶¨ÔÚÁËÔçÉÏ 8 µãÕû.


Ïà¹ØÎĵµ£º

apacheµÄ¾²Ì¬/¶¯Ì¬±àÒëÔÚapache+php+mysqlµÄÓ¦ÓÃ

apacheµÄ¾²Ì¬/¶¯Ì¬±àÒëÔÚapache+php+mysqlµÄÓ¦ÓÃ
ÎÒÏë´ó¼ÒÓв»ÉÙ¶¼³É¹¦ÊµÏÖapache+php+mysql£¬ÍøÉϵÄÎÄÕÂÒ²Óв»ÉÙ£¬µ«ÎÒ·¢ÏÖ²»ÉÙÎÄÕ¶¼Êdz­À´³­È¥£¬²¢ÇÒ
ûÓÐ˵Ã÷°×±àÒëµÄ·½Ê½£¬ÓеÄË÷ÐÔapache1.3µÄ±àÒë·½·¨Ô­·â²»¶¯µÄ°á¹ýÀ´Ì×ÔÚapache2.0£¬ÏÔÈ»Îóµ¼Ò»Ð©²ËÄñ £¡
ÎÒ½ñÌì¾ÍÒÔapache+mysql+php˵һϾ²Ì¬±àÒëºÍDSO¶¯Ì¬±à ......

MySql時間º¯數


Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-08 22:20:46 |
+---------------------+
³ýÁË now() º¯ÊýÄÜ»ñµÃµ±Ç°µÄÈÕÆÚʱ¼äÍ⣬MySQL Öл¹ÓÐÏÂÃæµÄº¯Êý£º
......

¹ØÓÚMySQLµÄÂýÈÕÖ¾·ÖÎö¹¤¾ß

½ñÌìÎÒÃÇ¿´¿´¹ØÓÚMySQLÂýÈÕÖ¾µÄÔĶÁ¡£
ÎÒÃÇÖªµÀ£¬Èç¹ûÎÒÃǵÄÓï¾ä²»¹»ÓÅ»¯£¬ÄÇôÊ×ÏÈMySQLµÄÂýÈÕÖ¾ÊǽøÒ»²½ÓÅ»¯µÄÀëÏßÖ¤¾Ý£¬ËäÈ»ÀïÃæÓкÃ
¶à“αÂýÓï¾ä”£¡
ÏȲ»ËµÔõôÓÅ»¯£¬Èç¹ûÄãµÄÈÕÖ¾ÓÐÒ»ÌõÓï¾ä¶ÄסÁË£¬ÄÇô»áÓв»¼ÆÆäÊýµÄÂýÓï¾äÌî³äµ½MySQLµÄÂúÈÕÖ¾ÀïÃæ¡£ÄÇôÊ×ÏÈÌáÁ¶³öÕâЩÓï
¾ä¾Í·Ç³£Í·ÌÛ¡£
½ñÌìÖ÷Òª½ ......

ÔõÑù½â¾ömysqlµÄtoo many connectionsÎÊÌâ?

¿ÉÒԲο¼ÏÂÁÐÎÄÕÂ
http://www.mysqlperformanceblog.com/2010/03/23/too-many-connections-no-problem/
½áÂÛÈçÏ£º
£¨1£©mysqlĬÈÏ»á¸øsuperÓû§ÁôÒ»¸öÁ¬½Ó£¬Äã¿ÉÒÔÓÃÕâ¸öÔ¤ÁôµÄÁ¬½ÓÀ´µÇ¼£¬À´Ôö¼ÓÁ¬½ÓÊý£»µ«ÊÇÈç¹ûÁ¬½ÓµÄÓû§È«ÊÇsuperȨÏ޵ģ¬ÔòÕâ¸öÔ¤ÁôµÄÁ¬½Ó²»´æÔÚ¡£Õâʱ¿ÉÒÔÓÃÒÔϵÄÃüÁîÀ´ÉèÖÃÁ¬½ÓÊý£ºgdb -p $(cat ......

Á˽âMySQLÊý¾Ý¿âËø¶¨»úÖÆ

Èç¹ûÒªÁ˽âMySQLÊý¾Ý¿âËø¶¨»úÖÆ£¬Ê×ÏÈÁ˽âÒ»ÏÂMySQLµÄÈýÖÖËø¶¨ÀàÐÍ£º
Ò»£¬Ðм¶Ëø¶¨
¶þ£¬±í¼¶Ëø¶¨
Èý£¬Ò³¼¶Ëø¶¨
ÕâÈýÖÖËø¶¨ÀàÐÍ£¬ÔÚMySQLÊý¾Ý¿âÖÐʹÓÃÈçÏ£º
Ðм¶Ëø¶¨£ºMyISAM£¬Memory£¬CSV[·ÇÊÂÎñÐԵĴ洢ÒýÇæ]
±í¼¶Ëø¶¨£ºInnoDB£¬NDB Chuster
Ò³¼¶Ëø¶¨£ºBerkeley DB
Á½ÖÖËø¶¨»úÖÆ£º¶ÁËø¶¨ºÍÐ´Ëø¶¨
MySQLÊý¾Ý¿âËø¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ