[ת]Mysql Sourceµ¼ÈëÂÒÂëÎÊÌâ
1¡¢È·¶¨Êý¾Ý¿âĬÈϱàÂ룬±ÈÈç±àÂëΪutf8,½«¶ÁÈë;¾¶±àÂëͬÑùÉèΪutf8£¬ÃüÁîΪ£ºset names utf8;
2¡¢source d:/20080613.sql µ¼ÈëÊý¾Ý¡£ÑéÖ¤Êý¾Ý¿âÖеÄÊý¾ÝÊÇ·ñ´æÔÚÂÒÂë¡£
3¡¢Èç¹ûÈÔÈ»´æÔÚÂÒÂëÎÊÌ⣬Õâʱºò¾ÍÒª¿¼ÂǸı䵼ÈëÎļþµÄ±àÂ룬ÊÔ×ŵ¼È룬ֱÖÁûÓÐÂÒÂë³öÏÖ¡£
ÍøÒ³Êý¾Ý´æÈëÂÒÂëÎÊÌâÒÀÕÕÒÔÉÏ·½·¨Í¬Ñù¿ÉÒÔ½â¾ö¡£¿É½«ÍøÒ³±àÂë¸ÄΪÓëÊý¾Ý¿âÏàͬµÄ±àÂë¡£ÎÊÌâ×ÔÈ»½â¾ö¡£
ÁíÍ⣬ÔÚwindowsÖÐÎļþ·¾¶ d:\ftptemp\test.sql Ӧд³É d:/ftptemp/test.sql
Ïà¹ØÎĵµ£º
http://hi.baidu.com/gushu/blog/item/3e821c174eabec064a90a7d4.html
mysql5Ìí¼ÓÁËһЩÐµĹ¦ÄܵĹæÔò£¬ÆäÖжԿªÔ´³ÌÐòÓ°Ïì±È½Ï´óµÄÓÐÁ½¸ö£¬Ò»¸öÊÇ4.0.12+¿ªÊ¼µÄ4²ã´Î×Ö·û¼¯£¬Ò»¸öÊÇ5.0.18¿ªÊ¼µÄĬÈÏstrict mode¡£
¶ÔÓÚÕâÁ½¸öÎÊÌ⣬ЧÂÊ×îºÃµÄ½â¾ö·½°¸£¬¾ÍÊÇÖ±½ÓÐÞ¸Ämy.ini
# The default character set that will be u ......
mysqlµ¼ÈësqlÎļþ:Mysqlµ¼Èëµ¼³ö.sqlÎļþ
²½ÖèÈçÏ£º
Ò».MYSQLµÄÃüÁîÐÐģʽµÄÉèÖãº
×ÀÃæ->ÎҵĵçÄÔ->ÊôÐÔ->»·¾³±äÁ¿->н¨->
PATH=“£»path\mysql\bin;”ÆäÖÐpathΪMYSQLµÄ°²×°Â·¾¶¡£
¶þ.¼òµ¥µÄ½éÉÜÒ»ÏÂÃüÁîÐнøÈëMYSQLµÄ·½·¨£º
1.C:\>mysql -h hostname -u username -p
°´ENTER ......
<?php
/*
*PHP¹ÜÀíMYSQLµÄÊý¾Ý¿âÀà
ʹÓ÷½·¨£º$dbConn = new DbConn([$Êý¾Ý¿âÃû(¿ÉÑ¡)]);
ÔÊÐí·µ»ØµÄ·½·¨£º
Execute($sql) //Ö´ÐÐSQLÓï¾ä£¬Ã»Óзµ»ØÖµ;
getRs($sql) //·µ»Ø²éѯÓï¾äµÄ¼Ç¼£¬Ò»Ìõ;
getRsArray($sql) //·µ» ......
ÎÒÃǵÄÏîÄ¿ÖÐÓкö಻µÈÓÚµÄÇé¿ö¡£½ñÌìдÕâƪÎÄÕ¼òµ¥µÄ·ÖÎöÒ»ÏÂÔõô¸öÓÅ»¯·¨¡£
ÕâÀïµÄ·Ö±íÂß¼ÊǸù¾Ýt_group±íµÄuser_name×éµÄ¸öÊýÀ´·ÖµÄ¡£
ÒòΪÕâÖÖÇé¿öµ¥¶Àuser_name×Ö¶ÎÉϵÄË÷Òý¾ÍÊôÓÚÀÃË÷Òý¡£Æð²»ÁËɶÃûÃ÷ÏÔµÄЧ¹û¡£
1¡¢ÊÔÑéPROCEDURE.
DELIMITER $$
DROP PROCEDURE `t_girl`.`sp_split_table`$$
CREATE PROCE ......
а²×°ºóµÄmysqlÊý¾Ý¿â£¬ÆäĬÈϵÄ×î´óÁ¬½ÓÊýΪ100¡£
·½·¨Ò»£º
ÔÚmysql°²×°Â·¾¶Ï£¬ÕÒµ½my.ini»òÕßmy.cnfÎļþ£¬´ò¿ªËüÕÒµ½max_connections,ÉèÖóÉ1000; È»ºóÖØÆômysql·þÎñ¡£
·½·¨¶þ£º
ÔÚmysqlÔËÐл·¾³Ï£¬½øÈëmysqlÃüÁîÏ£º
mysql> set global max_connections=1000;
È»ºó¹Ø±ÕmysqlÖØÆôËü£»
ÔÚ./bin·¾¶Ï£¬Ê¹Óà # ......