MySQL²éѯÓÅ»¯¼¼ÊõϵÁн²×ù֮ʹÓÃË÷Òý£¨Ò»£©
Ë÷ÒýÊÇÌá¸ß²éѯËٶȵÄ×îÖØÒªµÄ¹¤¾ß¡£µ±È»»¹ÓÐÆäËüµÄһЩ¼¼Êõ¿É¹©Ê¹Ó㬵«ÊÇÒ»°ãÀ´ËµÒýÆð×î´óÐÔÄܲîÒìµÄ¶¼ÊÇË÷ÒýµÄÕýȷʹÓá£ÔÚMySQLÓʼþÁбíÖУ¬ÈËÃÇ
¾³£Ñ¯ÎÊÄÇЩÈòéѯÔËÐеøü¿ìµÄ·½·¨¡£ÔÚ´ó¶àÊýÇé¿öÏ£¬ÎÒÃÇÓ¦¸Ã»³ÒÉÊý¾Ý±íÉÏÓÐûÓÐË÷Òý£¬²¢ÇÒͨ³£ÔÚÌí¼ÓË÷ÒýÖ®ºóÁ¢¼´½â¾öÁËÎÊÌâ¡£µ±È»£¬²¢²»×ÜÊÇÕâÑù¼òµ¥
¾Í¿ÉÒÔ½â¾öÎÊÌâµÄ£¬ÒòΪÓÅ»¯¼¼Êõ±¾À´¾Í²¢·Ç×ÜÊǼòµ¥µÄ¡£È»¶ø£¬Èç¹ûûÓÐʹÓÃË÷Òý£¬ÔںܶàÇé¿öÏ£¬ÄãÊÔͼʹÓÃÆäËüµÄ·½·¨À´Ìá¸ßÐÔÄܶ¼ÊÇÔÚÀË·Ñʱ¼ä¡£Ê×ÏÈʹÓÃ
Ë÷ÒýÀ´»ñÈ¡×î´óµÄÐÔÄÜÌá¸ß£¬½Ó×ÅÔÙ¿´ÆäËüµÄ¼¼ÊõÊÇ·ñÓÐÓá£
¡¡¡¡ÕâÒ»²¿·Ö½²ÊöÁËË÷ÒýÊÇʲôÒÔ
¼°Ë÷ÒýÊÇÔõôÑùÌá¸ß²éѯÐÔÄܵġ£Ëü»¹ÌÖÂÛÁËÔÚijЩ»·¾³ÖÐË÷Òý¿ÉÄܽµµÍÐÔÄÜ£¬²¢ÎªÄãÃ÷ÖǵØÑ¡ÔñÊý¾Ý±íµÄË÷ÒýÌṩÁËһЩָµ¼·½Õë¡£ÔÚÏÂÒ»²¿·ÖÖÐÎÒÃǽ«ÌÖÂÛ
MySQL²éѯÓÅ»¯Æ÷£¬ËüÊÔͼÕÒµ½Ö´ÐвéѯµÄЧÂÊ×î¸ßµÄ·½·¨¡£Á˽âһЩÓÅ»¯Æ÷µÄ֪ʶ£¬×÷Ϊ¶ÔÈçºÎ½¨Á¢Ë÷ÒýµÄ²¹³ä£¬¶ÔÎÒÃÇÊÇÓкô¦µÄ£¬ÒòΪÕâÑùÄã²ÅÄܸüºÃµØ
ÀûÓÃ×Ô¼ºËù½¨Á¢µÄË÷Òý¡£Ä³Ð©±àд²éѯµÄ·½·¨Êµ¼ÊÉÏÈÃË÷Òý²»Æð×÷Óã¬ÔÚÒ»°ãÇé¿öÏÂÄãÓ¦¸Ã±ÜÃâÕâÖÖÇéÐεķ¢Éú¡£
¡¡¡¡Ë÷ÒýµÄÓŵã
¡¡
¡¡ÈÃÎÒÃÇ¿ªÊ¼Á˽âË÷ÒýÊÇÈçºÎ¹¤×÷µÄ£¬Ê×ÏÈÓÐÒ»¸ö²»´øË÷ÒýµÄÊý¾Ý±í¡£²»´øË÷ÒýµÄ±í½ö½öÊÇÒ»¸öÎÞÐòµÄÊý¾ÝÐм¯ºÏ¡£ÀýÈ磬ͼ1ÏÔʾµÄad±í¾ÍÊDz»´øË÷ÒýµÄ±í£¬Òò
´ËÈç¹ûÐèÒª²éÕÒij¸öÌض¨µÄ¹«Ë¾£¬¾Í±ØÐë¼ì²é±íÖеÄÿ¸öÊý¾ÝÐп´ËüÊÇ·ñÓëÄ¿±êÖµÏàÆ¥Åä¡£Õâ»áµ¼ÖÂÒ»´ÎÍêÈ«µÄÊý¾Ý±íɨÃ裬Õâ¸ö¹ý³Ì»áºÜÂý£¬Èç¹ûÕâ¸ö±íºÜ´ó£¬µ«
ÊÇÖ»°üº¬ÉÙÁ¿µÄ·ûºÏÌõ¼þµÄ¼Ç¼£¬ÄÇôЧÂÊ»á·Ç³£µÍ¡£
ͼ1£ºÎÞË÷ÒýµÄad±í
¡¡
¡¡Í¼2ÊÇͬÑùµÄÒ»ÕÅÊý¾Ý±í£¬µ«ÊÇÔö¼ÓÁ˶Ôad±íµÄcompany_numÊý¾ÝÁеÄË÷Òý¡£Õâ¸öË÷Òý°üº¬ÁËad±íÖеÄÿ¸öÊý¾ÝÐеÄÌõÄ¿£¬µ«ÊÇË÷ÒýµÄÌõÄ¿ÊÇ°´ÕÕ
company_numÖµÅÅÐòµÄ¡£ÏÖÔÚ£¬ÎÒÃDz»ÊÇÖðÐв鿴ÒÔËÑÑ°Æ¥ÅäµÄÊý¾ÝÏ¶øÊÇʹÓÃË÷Òý¡£¼ÙÉèÎÒÃDzéÕÒ¹«Ë¾13µÄËùÓÐÊý¾ÝÐС£ÎÒÃÇ¿ªÊ¼É¨ÃèË÷Òý²¢ÕÒµ½
Á˸ù«Ë¾µÄÈý¸öÖµ¡£½Ó×ÅÎÒÃÇÅöµ½Á˹«Ë¾14µÄË÷ÒýÖµ£¬Ëü±ÈÎÒÃÇÕýÔÚËÑÑ°µÄÖµ´ó¡£Ë÷ÒýÖµÊÇÅŹýÐòµÄ£¬Òò´Ëµ±ÎÒÃǶÁÈ¡ÁË°üº¬14µÄË÷Òý¼Ç¼µÄʱºò£¬ÎÒÃǾÍÖªµÀ
ÔÙÒ²²»»áÓиü¶àµÄÆ¥Åä¼Ç¼£¬¿ÉÒÔ½áÊø²éѯ²Ù×÷ÁË¡£Òò´ËʹÓÃË÷Òý»ñµÃµÄ¹¦Ð§ÊÇ£ºÎÒÃÇÕÒµ½ÁËÆ¥ÅäµÄÊý¾ÝÐÐÔÚÄĶùÖÕÖ¹£¬²¢Äܹ»ºöÂÔÆäËüµÄÊý¾ÝÐС£ÁíÒ»¸ö¹¦Ð§À´×Ô
ʹÓö¨Î»Ëã·¨²éÕÒµÚÒ»ÌõÆ¥ÅäµÄÌõÄ¿£¬¶ø²»ÐèÒª´ÓË÷ÒýÍ·¿ªÊ¼Ö´ÐÐÏßÐÔɨÃ裨ÀýÈ磬¶þ·ÖËÑË÷¾Í±ÈÏßÐÔɨÃèÒª¿ìһЩ£©¡£Í¨¹ýʹÓÃÕâÖÖ·½·¨£¬ÎÒÃÇ¿ÉÒÔ¿ìËٵض¨Î»µÚ
Ò»¸öÆ¥Åä
Ïà¹ØÎĵµ£º
try
{
string _conStr = "Driver={MySQL ODBC 3.51
Driver};server=localhost;database=test;uid=test;password=1;option=3";
& ......
Ò»¡¢Ê²Ã´ÊÇË÷Òý£¿
Ë÷ÒýÓÃÀ´¿ìËÙµØÑ°ÕÒÄÇЩ¾ßÓÐÌض¨ÖµµÄ¼Ç¼£¬ËùÓÐMySQLË÷Òý¶¼ÒÔB-Ê÷µÄÐÎʽ±£´æ¡£Èç¹ûûÓÐË÷Òý£¬Ö´ÐвéѯʱMySQL±ØÐë´ÓµÚÒ»¸ö¼Ç¼¿ªÊ¼É¨ÃèÕû¸ö±íµÄËùÓмǼ£¬Ö±ÖÁÕÒµ½·ûºÏÒªÇóµÄ¼Ç¼¡£±íÀïÃæµÄ¼Ç¼ÊýÁ¿Ô½¶à£¬Õâ¸ö²Ù×÷µÄ´ú¼Û¾ÍÔ½¸ß¡£Èç¹û×÷ΪËÑË÷Ìõ¼þµÄÁÐÉÏÒѾ´´½¨ÁËË÷Òý£¬MySQLÎÞÐèɨÃèÈκμǼ¼´¿ÉѸËٵà ......
1.linuxÏÂÆô¶¯mysqlµÄÃüÁ
mysqladmin start
/ect/init.d/mysql start (Ç°ÃæΪmysqlµÄ°²×°Â·¾¶)
2.linuxÏÂÖØÆômysqlµÄÃüÁ
mysqladmin restart
/ect/init.d/mysql restart (Ç°ÃæΪmysqlµÄ°²×°Â·¾¶)
3.linuxϹرÕmysqlµÄÃüÁ
mysqladmin shutdown
/ect/init.d/mysql&nbs ......
Ò» Apache°²×°
# tar zxvf httpd-2.2.14.tar.gz(½âѹ)
# cd httpd-2.2.14(½øÈë½âѹºóµÄĿ¼)
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=all
(ÃüÁî#./configure --help¿ÉÒԲ鿴configureµÄÅäÖòÎÊý
--prefix=°²×°Â·¾¶
--enable-so //´ò¿ª DSO Ö§³ÖµÄ a ......
ʲôÊÇË÷Òý£¿
Ë÷
ÒýÓÃÀ´¿ìËÙµØÑ°ÕÒÄÇЩ¾ßÓÐÌض¨ÖµµÄ¼Ç¼£¬ËùÓÐMySQLË÷Òý¶¼ÒÔB-Ê÷µÄÐÎʽ±£´æ¡£Èç¹ûûÓÐË÷Òý£¬Ö´ÐвéѯʱMySQL±ØÐë´ÓµÚÒ»¸ö¼Ç¼¿ªÊ¼É¨ÃèÕû¸ö±íµÄ
ËùÓмǼ£¬Ö±ÖÁÕÒµ½·ûºÏÒªÇóµÄ¼Ç¼¡£±íÀïÃæµÄ¼Ç¼ÊýÁ¿Ô½¶à£¬Õâ¸ö²Ù×÷µÄ´ú¼Û¾ÍÔ½¸ß¡£Èç¹û×÷ΪËÑË÷Ìõ¼þµÄÁÐÉÏÒѾ´´½¨ÁËË÷Òý£¬MySQLÎÞÐèɨÃèÈκμǼ¼´
¿ ......