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

MySQL×Ö·û¼¯ÎÊÌâ

¡¾×ª×Ô£ºhttp://tdcq.javaeye.com/blog/363955£¬·Ç³£¸Ðлԭ×÷Õß¡¿
ÕâƪÎÄÕÂÊÇÍøÉϸ÷ÖÖ½â¾ömysqlÖÐÎÄÂÒÂëÎÊÌâµÄ¼¯´ó³ÉÕߣ¬Ò»°ã¿ÉÒÔ½â¾öÎÊÌâ¡£
mysql ´´½¨
Êý¾Ý¿âʱָ¶¨±àÂëºÜÖØÒª£¬ºÜ¶à¿ª·¢Õ߶¼Ê¹ÓÃÁËĬÈϱàÂ룬µ«ÊÇÎÒʹÓõľ­ÑéÀ´¿´£¬Öƶ¨Êý¾Ý¿âµÄ±àÂë¿ÉÒԺܴó³Ì¶ÈÉϱÜÃâµ¹Èëµ¼³ö´øÀ´µÄÂÒÂëÎÊÌâ¡£
ÎÒÃÇ×ñÑ­µÄ±ê×¼ÊÇ£¬Êý¾Ý¿â£¬±í£¬×ֶκÍÒ³Ãæ»òÎı¾µÄ±àÂëҪͳһÆðÀ´
ºÜ¶àmysqlÊý¾Ý¿â¹¤¾ß£¨³ýÁËphpmyadmin£¬ÎÒż¶ûÓ㬹¦ÄÜÇ¿ËÙ¶ÈÂý£©¶¼²»Ö§³Ö´´½¨Ê±Ö¸¶¨Êý¾Ý¿â±àÂ룬µ±È»¿ÉÒÔ¸Ämy.iniÀ´½â¾öÕâ¸öÎÊÌâ,µ«ÊÇÐèÒªÖØÐÂÆô¶¯mysql£¬²»¹ýÓÃÏÂÃæµÄÓï¾ä»á¸üÓÐЧ
GBK: create database test2 DEFAULT CHARACTER SET gbk COLLATE
gbk_chinese_ci;
UTF8: CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci
×¢Ò⣺Èç¹û²»ÊÇͨ¹ýmy.iniÅäÖÃÎļþÉèÖõÄÄÚÈÝ£¬Ö»ÔÚµ±Ç°×´Ì¬ÏÂÓÐЧ£¬µ±ÖØÆôÊý¾Ý¿â·þÎñºóʧЧ¡£ËùÒÔÈç¹ûÏëÒª²»³öÏÖÂÒÂëÖ»ÓÐÐÞ¸Ämy.iniÎļþ£¬Êý¾Ý¿â±àÂë¿ÉÒÔÔÚ´´½¨Êý¾Ý¿âʱºòÖ¸¶¨UTF8£¬ÈçÏ£º
|character_set_client     
|
utf8                                 
|
| character_set_connection |
utf8                                 
|
| character_set_database   |
utf8                                 
|
| character_set_filesystem |
binary                               
|
|
character_set_results   
|
utf8                    


Ïà¹ØÎĵµ£º

ʹÓÃMySQL connector/C++Á´½ÓMySQLÊý¾Ý¿â

Ê×ÏÈÈ¥MySQL¹ÙÍøÏÂÔØMySQL connector/C++
http://dev.mysql.com/downloads/connector/cpp/1.0.html
ÏÂÔصڶþ¸ö°ü£¬windows32λ·Ç°²×°°æ£¨¸öÈ˾õµÃÕâ¸ö°ü¸É¾»£©¡£Ä¿Ç°µÄ°æ±¾ÊÇConnector/C++ 1.0.5¡£
Windows (x86, 32-bit), ZIP Archive
(mysql-connector-c++-noinstall-1.0.5-win32.zip)
½«Õû¸ö°ü½âѹµ½ÏîÄ¿Îļþ¼Ðϵ ......

MySQLÖÐÓÃselectʵÏÖTOP N¹¦ÄÜ ¼°·ÖÒ³


MySQLÖÐÓÃselectʵÏÖTOP N¹¦ÄÜ
ÏÈ˵¼¸¸ö¹Ø¼ü×Ö£º
distinct ·µ»Ø²»Öظ´µÄ¶àÁÐ
count() ¼ÆÊý
limit m,n µÚm¸öÆðn¸ö
 
ÄÇô£¬Èç¹ûÐèÒª²éÕÒÃûΪcolµÄijһ¸öÁеÄTop N£¬²¢Áгö¶ÔÓ¦µÄÖµµÄselectÓï¾ä¾ÍÈçÏ£º
select dinstinct(col),count(col) from tablename group by 1 order  ......

mysql ibdata1ÎļþµÄËõС

mysql ibdata1ÎļþµÄËõС(2009-12-22 15:29:46)
±êÇ©£ºit 
 
mysql ibdata1´æ·ÅÊý¾Ý£¬Ë÷ÒýµÈ£¬ÊÇMYSQLµÄ×îÖ÷ÒªµÄÊý¾Ý¡£
Èç¹û²»°ÑÊý¾Ý·Ö¿ª´æ·ÅµÄ»°£¬Õâ¸öÎļþµÄ´óСºÜÈÝÒ×¾ÍÉÏÁËG£¬ÉõÖÁ10+G¡£¶ÔÓÚijЩӦÓÃÀ´Ëµ£¬²¢²»ÊÇÌ«ºÏÊÊ¡£Òò´ËÒª°Ñ´ËÎļþËõС¡£
·½·¨£ºÊý¾ÝÎļþµ¥¶À´æ·Å¡£
²½Ö裺
1£¬±¸·ÝÊý¾Ý¿â
......

mysqlÔÚlinuxϵÄmy.cnfÎļþÔÚÄÄÀ

ÓÃrpm°ü°²×°µÄMySQLÊDz»»á°²×°/etc/my.cnfÎļþµÄ£¬
ÖÁÓÚΪʲôûÓÐÕâ¸öÎļþ¶øMySQLÈ´Ò²ÄÜÕý³£Æô¶¯ºÍ×÷Óã¬ÔÚµãÓÐÁ½¸ö˵·¨£¬
µÚÒ»ÖÖ˵·¨£¬my.cnfÖ»ÊÇMySQLÆô¶¯Ê±µÄÒ»¸ö²ÎÊýÎļþ£¬¿ÉÒÔûÓÐËü£¬ÕâʱMySQL»áÓÃÄÚÖõÄĬÈϲÎÊýÆô¶¯£¬
µÚ¶þÖÖ˵·¨£¬MySQLÔÚÆô¶¯Ê±×Ô¶¯Ê¹ÓÃ/usr/share/mysqlĿ¼ÏµÄmy-medium.cnfÎļþ£¬ÕâÖÖ˵·¨½ö ......

mysql³£ÓÃÃüÁî

mysql³£ÓÃÃüÁî 
  
¹Ø±ÕÊý¾Ý¿â
/data01/mysql/bin/mysqladmin -p shutdown
µ¼³öÊý¾Ý¿â
/usr/local/mysql/bin/mysqldump -opt -uroot -p -h10.15.0.45 bbsdb > 20070918.bbsdb.sql
µ¼ÈëÊý¾Ý¿â
/usr/local/mysql/bin/mysql target_db_name < backup-file.sql
ÏÞÖÆÖ»ÓÐÄÚ²¿ip¿ÉÒÔÁ´½Ó
/u ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ