MYSQL¹ØÓÚ×Ö·û±àÂë·½ÃæµÄ´æ´¢ÔÀí
* mysqlÊ×ÏȽ«Äõ½µÄÊý¾Ýת»»Îªcharacter_set_clientÖ¸¶¨µÄ±àÂë¸ñʽ£¬È»ºóת»»Îª character_set_connectionÖ¸¶¨µÄ¸ñʽ£¬×îºóÔÙ½«Êý¾Ý´æ´¢µ½Êý¾Ý¿â£¬´æ´¢¸ñʽΪcharacter_set_databaseËùÖ¸¶¨µÄ¸ñʽ£»
* ´ÓÊý¾Ý¿â¶ÁÊý¾Ýʱ£¬½«Êý¾Ý¿â¸ñʽת»»Îªcharacter_set_resultsÖ¸¶¨µÄ¸ñʽ£¬ÔÙ·¢Ë͸øÍⲿ³ÌÐò£¬Õâ¾ÍÒªÇó¿Í»§¶Ë³ÌÐòºÍcharacter_set_results±àÂë¸ñʽÏàͬ£»
* ΪÁ˱ÜÃâÒýÆðÂÒÂëÎÊÌ⣬½¨ÒéÔÚ´´½¨Êý¾Ý¿âʱÏÈÉèÖñàÂë¸ñʽ£ºSET NAMES 'utf8',ÕâÌõÃüÁîÏ൱ÓÚÒÔÏÂÈýÌõÃüÁ
* SET character_set_client = 'utf8';
* SET character_set_connection = 'utf8';
* SET character_set_results £½ 'utf8';
* ͬʱ´ÓÊý¾Ý¿âselectÊý¾Ýʱ£¬ÉèÖñàÂë¸ñʽ£ºSET NAMES 'utf8'£¬ÍøÉÏ˵ִÐÐinsert,update²Ù×÷ʱËƺõ²»ÐèÒªÉèÖã¬ÎÒµÄûÉèÖÃûÎÊÌâ;
* ÍøÉÏ˵ÓÃutf8´æ´¢datetime×ֶγö´íÇÒÔÚutf8±àÂëÏÂÎÞ·¨Õý³£ÏÔʾ£¬µ«ÔÚgb2312ÏÂÄÜÕý³£ÏÔʾ
Ïà¹ØÎĵµ£º
ÈçºÎÌá¸ßmysql load
data
infile
µÄËÙ¶È
²âÊÔÊý¾Ý2.5G£¬¹²ÓÐÊý¾Ý9427567Ìõ¡£ÓõÄmysqlµÄlarge·þÎñÆ÷µÄÅäÖá£
load
Ò»´ÎÐèÒª´ó¸Å10·ÖÖÓ×óÓÒ¡£
½¨µÄ±íÓõÄÊÇMYISAM£¬µ÷ÕûÁ˼¸¸ösessionµÄ²ÎÊýÖµ
SET SESSION BULK_INSERT_BUFFER_SIZE=256217728;
SET SESSION MYISAM_SORT_BUFFER_SIZE=256217728;
ÔËÐнá¹ûÈçÏÂ
Qu ......
±¸·ÝMySQLÊý¾Ý¿âµÄÃüÁî
mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ
±¸·ÝMySQLÊý¾Ý¿âΪ´øɾ³ý±íµÄ¸ñʽ£¬Äܹ»Èøñ¸·Ý¸²¸ÇÒÑÓÐÊý¾Ý¿â¶ø²»ÐèÒªÊÖ¶¯É¾³ýÔÓÐÊý¾Ý¿â¡£
mysqldump -–add-drop-table -uusername -ppassword databasename > bac ......
C APIÏà¹Ø
C APIÊý¾ÝÀàÐÍ
MYSQL
¸Ã½á¹¹´ú±í1¸öÊý¾Ý¿âÁ¬½ÓµÄ¾ä±ú¡£¼¸ºõËùÓеÄMySQLº¯Êý¾ùʹÓÃËü¡£²»Ó¦³¢ÊÔ¿½±´MYSQL½á¹¹¡£²»±£Ö¤ÕâÀ࿽±´½á¹û»áÓÐÓá£
MYSQL_RES
¸Ã½á¹¹´ú±í·µ»ØÐеIJéѯ½á¹û£¨SELECT, SHOW, DESCRIBE, EXPLAIN£©¡£ÔÚ±¾½ÚµÄÊ£Óಿ·Ö£¬½«²éѯ·µ»ØµÄÐÅÏ¢³ÆΪ“½á¹û¼¯&rdq ......
Oracleº¯ÊýºÍmysqlº¯Êý±È½Ï
1. OracleÖеÄto_number()ת»»³ÉÊý×Ö£»
Oracle> Select to_number(‘123’) from dual; ----- 123;
&nbs ......
MySQLµÄ±¸·Ý·½Ê½£¬Ä¿Ç°ÎÒÏëµ½µÄÓÐÎåÖÖ£¬ÓпÉÄÜ»¹ÓÐ
1£¬mysqldump·½Ê½£¬¼ÓÉϾßÌå²ÎÊýÃû£¨µ¥¿â£¬¶à¿â£¬´¥·¢Æ÷£¬´æ´¢¹ý³Ì£¬±í½á¹¹£¬×Ö·û¼¯£¬–single-transaction£¬µÈµÈ£©
2£¬mysqlhotcopy Ö»Äܱ¸·ÝmyisamÊý¾Ý±í±¸·Ý£¬ËÙ¶ÈÏ൱¿ì£¬ÒòΪÊÇÎļþ¿½±´£¬¿ÉÄÜ˲¼ä±»Ëø±í£¬ÈκεÄÊý¾Ý²Ù×÷£¬±ÈÈç²åÈëºÍ¸üж¼»á¹ÒÆð¡£
3£¬LVMµ ......