mysql5µÄ×Ö·û¼¯ºÍsql modeÎÊÌâ
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 used when a new schema or table is
# created and no character set is defined
default-character-set=utf8
#ÕâÀï¸Ä³Éutf-8
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES£¬ NO_AUTO_CREATE_USER£¬ NO_ENGINE_SUBSTITUTION"
#ÕâÀï¸Ä³É=""
µ±ÄãûÓÐȨÏÞ½øÐÐÐÞ¸Äʱ£¬¾ÍÖ»ºÃÔÚ³ÌÐòÖÐÅжÏÁËmysql5 й¦ÄÜ£¬±ØÐëÔÚÿ´ÎÁ¬½ÓÉÏÊý¾Ý¿âʱ½øÐÐÉ趨¡£ÔÚʹÓÃÁËÊý¾Ý¿â³éÏó²ãµÄ³ÌÐòÖÐÐÞ¸ÄÆðÀ´Ò²ºÜ¼òµ¥£º
if(mysql_get_server_info( $connect ) > '4.0.1')
{
mysql_query( "set names 'utf8'" £¬ $connect );
}
if(mysql_get_server_info( $connect ) > '5.0.1')
{
mysql_query("SET sql_mode=''" £¬ $connect );
}
Ïà¹ØÎĵµ£º
ÓйطÖÒ³ SQL µÄ×ÊÁϺܶ࣬ÓеÄʹÓô洢¹ý³Ì£¬ÓеÄʹÓÃÓαꡣ±¾È˲»Ï²»¶Ê¹ÓÃÓα꣬ÎÒ¾õµÃËüºÄ×Ê¡¢Ð§Âʵͣ»Ê¹Óô洢¹ý³ÌÊǸö²»´íµÄÑ¡Ôñ£¬ÒòΪ´æ´¢¹ý³ÌÊǾ¹ýÔ¤±àÒëµÄ£¬Ö´ÐÐЧÂʸߣ¬Ò²¸üÁé»î¡£ÏÈ¿´¿´µ¥Ìõ SQL Óï¾äµÄ·ÖÒ³ SQL °É¡£
·½·¨1£º
ÊÊÓÃÓÚ SQL Server 2000/2005
SELECT TOP Ò³´óС *
from tab ......
*
* ¹¦ÄÜ˵Ã÷:±¸·ÝºÍ»Ö¸´SQL ServerÊý¾Ý¿â
* ×÷Õß: Áõ¹¦Ñ«;
* °æ±¾:V0.1(C#2.0);ʱ¼ä:2007-1-1
* µ±Ê¹ÓÃSQL Serverʱ,ÇëÒýÓà COM×é¼þÖеÄ,SQLDMO.dll×é¼þ
* µ±Ê¹ÓÃAccessÖÐ,Çëä¯ÀÀÌí¼ÓÒýÓÃÒÔÏÂÁ½¸ödll
* ÒýÓÃC:/Progra ......
¹«Ë¾¿ª·¢ÁËÒ»¸öÍøÕ¾£¬¹À¼Æ×î¸ßÔÚÏßÈËÊýÊÇ3 Íò£¬²¢·¢ÈËÊý×î¶à100 ÈË¡£¿ª·¢µÄÍøÕ¾ÊÇ·ñÄÜ·ñ³ÐÊÜÕâ¸öѹÁ¦£¬ÈçºÎÈ·±£ÍøÕ¾µÄ¸ººÉûÓÐÎÊÌ⣬¾¹ýÑо¿¾ö¶¨ÈçÏ£º
£¨1 £©²ÉÓøºÔØƽºâºÍ¼¯Èº¼¼Êõ£¬³õ²½»ú¹¹²ÉÓÃApache Tomcat µÄ»úȺ¼¼Êõ¡£
£¨2 £©²ÉÓÃѹÁ¦²âÊÔ¹¤¾ß£¬²âÊÔѹÁ¦¡£¹¤¾ßÊÇLoadrunner.
Ó²¼þ»·¾³´î½¨£º
ΪÁËÄܹ»½øÐÐѹÁ¦² ......
½ü¶Îʱ¼äͻȻ¶ÔMYSQLÕâ¸ö¿ªÔ´Êý¾ÝÓÐÁËÐËȤ£¬Ö÷ÒªÊÇÆäÊÇ¿ªÔ´Ãâ·Ñ£¬ÏëÏëÒÔºóÎÞÂÛÊǹ«Ë¾×öÏîÄ¿»¹ÊǸöÈË×öЩ¼òµ¥µÄСϵͳ£¬¶¼¿ÉÒÔÑ¡Ôñ£¬ÓÚÊÇ»¨Á˵ãʱ¼äÑо¿ÁËÏ£¬ÏÖÔÚ·ÖÏíÏÂ×Ô¼ºµÄѧϰÐĵ᣽ñÌì¿´ÁËдÆäϵͳµÄ×é³ÉºÍÕûÌå½á¹¹£¬ÏÖÔÚ°ÑÕûÌåµÄ½á¹¹ÓÃVISIO»ÁËÏ£¬È»ºóÖðÒ»½âÊÍ£¬²¢²ûÊöÏÂÎÒµÄÀí½â£¬Ï±ßÊÇMySQLϵͳ½á¹¹Í¼µ ......
1.µ¼³öÕû¸öÊý¾Ý¿â
¡¡¡¡mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû
¡¡¡¡mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
2.µ¼³öÒ»¸ö±í
¡¡¡¡mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû ±íÃû> µ¼³öµÄÎļþÃû
¡¡¡¡mysqldump -u wcnc -p smgp_apps_wcnc users> wcnc_users.sql
3.µ¼³öÒ»¸öÊý¾Ý¿â½á¹¹
¡¡¡¡mysqld ......