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

MYSQL[ÃüÁîÐÐÏÂ]µ¼Èëµ¼³ö´óÊý¾Ý·½·¨£¡


2007-11-16 15:37
½ñÌì¿´×ÅÊÖ²áÊÔÁËÏ£¬·¢ÏÖÔ­À´´óÊý¾Ýµ¼Èëµ¼³öÊÇÄÇôµÄÇáËÉ£¨²»ÊǺܴó£¬200¶àMµÄÎı¾¶øÒÔ£©
×¢Ò⣺Èç¹û·¢ÏÖMYSQL unknown command '\'ÕâÑùµÄÌáʾ£¬ÔòÉèÖÃһϷþÎñÆ÷µÄ×Ö·û¼¯£¬È磺
mysql -uroot -ppasspass --default-character-set=utf8 databaseName <d:bakcup.sql
ÕâÑù¾Í²»»á±¨´íÁË£¬^_^
µ¼³ö£º(mysqldump)
cmd>ϽøÐÐMysqlµÄ°²×°Ä¿Â¼£¬½øÈëbinĿ¼£¡
mysqldump -u root -p database_name > d:backup\bak_sql_name.sql
È»ºó»Ø³µ£¨ÆäÖУ¬-u mysqlµÄÓû§ -pΪÃÜÂë(¿Õ×Å) database_nameΪÐèÒª±¸·ÝµÄÊý¾ÝÃû£¬> ºóÃæ¾ÍÊǵØÖ·ÁË£¡£©
ÏêϸµÄ²ÎÊý£¬¿É¿´¹Ù·½Êֲᣡ
µ¼È룺£¨mysql£©
ÔÚmysqlµÄbinĿ¼Ï£¬¼üÈëmysql -u root -p database_name < d:backup\bak_sql_name.sql
ÌáʾÊäÈëÕýÈ·ÃÜÂë¾ÍOKÁË£¡
Ò²¿ÉÒÔ¼üÈëmysql -u root -p£¨µÇ½mysql¿ØÖÆÌ¨£¬ÓÃsource»ò\.ÃüÁî½øÐе¼È룡£©
mysql>source d:backup\bak_sql_name.sql
mysql>\. d:bakcup\bak_sql_name.sql
mysqldumpÓ÷¨¼¸Àý
2007/08/24 02:27 P.M.
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
¼¸¸ö³£ÓÃÓÃÀý£º
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.µ¼³öÒ»¸öÊý¾Ý¿â½á¹¹
    mysqldump -u wcnc -p -d --add-drop-table smgp_apps_wcnc >d:\wcnc_db.sql
-d ûÓÐÊý¾Ý --add-drop-table ÔÚÿ¸öcreateÓï¾ä֮ǰÔö¼ÓÒ»¸ödrop table
4.´øÓïÑÔ²ÎÊýµ¼³ö
   mysqldump -uroot -p --default-character-set=latin1 --set-charset=gbk --skip-opt databse > d4.sql
5.µ¼ÈëÊý¾Ý¿â
    ³£ÓÃsource ÃüÁî
    ½øÈëmysqlÊý¾Ý¿â¿ØÖÆÌ¨£¬
    Èçmysql -u root -p 
  
    mysql>use Êý¾Ý¿â
    È»ºóʹÓÃsourceÃüÁºóÃæ²ÎÊýΪ½Å±¾Îļþ£¨ÈçÕâÀïÓõ½µÄ.sql£©
    mysql>source d:\wcnc_db.sql
mysqldumpÖ§³ÖÏÂÁÐÑ¡Ï
–add-locks
ÔÚÿ¸ö±íµ¼³ö֮ǰÔö¼ÓLOCK TABLES²¢ÇÒÖ®ºóUNLOCK TABLE¡£(ΪÁËʹµÃ¸ü¿ìµØ²åÈ


Ïà¹ØÎĵµ£º

ʵÏÖwin2003ÏÂmysqlÊý¾Ý¿âÿÌì×Ô¶¯±¸·Ý

ÖÕÓÚÈ÷þÎñÆ÷ÿÌìÔçÉϱ¸·ÝÒ»´Î MySQL Êý¾Ý¿â²¢×Ô¶¯´ò°ü,ͬʱɾ³ý 5 ÌìǰµÄ±¸·ÝÎļþ. ·ÖÏíÈçÏÂ.
1. »·¾³: windows server 2003 + Apache 2.0 + PHP5 + MySQL 4.0.26 .
2. ¼ÙÉè PHP °²×°Ä¿Â¼Îª D:/php ,MySQL °²×°Ä¿Â¼Îª D:/mysql.
3. ÔÚ D:/php Ͻ¨Á¢Ä¿Â¼ WinRAR, °ÑÄã winrar °²×°Ä¿Â¼Ï嵀 WinRAR.exe ºÍ RARReg.KEY ¸´ ......

MySQLÈçºÎÀûÓÃË÷ÒýÓÅ»¯ORDER BYÅÅÐòÓï¾ä


MySQLË÷Òýͨ³£ÊDZ»ÓÃÓÚÌá¸ßWHEREÌõ¼þµÄÊý¾ÝÐÐÆ¥Åä»òÕßÖ´ÐÐÁª½á²Ù×÷ʱƥÅäÆäËü±íµÄÊý¾ÝÐеÄËÑË÷ËÙ¶È¡£
MySQLÒ²ÄÜÀûÓÃË÷ÒýÀ´¿ìËÙµØÖ´ÐÐORDER BYºÍGROUP BYÓï¾äµÄÅÅÐòºÍ·Ö×é²Ù×÷¡£
ͨ¹ýË÷ÒýÓÅ»¯À´ÊµÏÖMySQLµÄORDER BYÓï¾äÓÅ»¯£º
1¡¢ORDER BYµÄË÷ÒýÓÅ»¯¡£Èç¹ûÒ»¸öSQLÓï¾äÐÎÈ磺
SELECT [column1],[column2],…. fro ......

MySQL 5.1ÍêÈ«Ð¶ÔØ

1¡¢¿ØÖÆÃæ°åÀïµÄÔö¼Óɾ³ý³ÌÐòÄÚ½øÐÐɾ³ý
2¡¢É¾³ýMySQLÎļþ¼ÐϵÄmy.iniÎļþ£¬Èç¹û±¸·ÝºÃ£¬¿ÉÒÔÖ±½Ó½«Îļþ¼ÐÈ«²¿É¾³ý
3¡¢¿ªÊ¼->ÔËÐÐ-> regedit ¿´¿´×¢²á±íÀïÕ⼸¸öµØ·½É¾³ýûÓÐ
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL Ŀ¼ɾ³ý
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\S ......

mysql³öÏÖunauthenticated user¼òµ¥·ÖÎöÒÔ¼°½â¾ö

µ±ÓÃshow processlist;¿´µ½ÈçÏÂÐÅϢʱ:
LL | login | NULL             |
| 697 | unauthenticated user | 218.26.219.186:26944  | NULL       | Connect | NULL | login | NULL      & ......

Mysql data to long´íÎóµÄ´¦Àí·½·¨

½ñÌìÔÚдʵϰÉúµÄÅàѵPPTʱ£¬ÓÃmysqlµÄcommand line client²åÈëÒ»Ìõ´øÖÐÎĵļǼʱ£¬±¨data to longµÄ´íÎó£¬
ÔÚÍøÉϲ鿴ÁËÏà¹Ø×ÊÁÏ£¬ËµµÄÊÇÒòΪÕâ¸öconsoleʹÓÃÁËÒ»ÖÖ±àÂ뷽ʽ£¬°ÑÃüÁî±àÂëºóÔÙ·¢Ë͵½Êý¾Ý¿â£¬¾ßÌåÇë²Î¿´http://www.cnblogs.com/ovliverlin/archive/2007/11/26/972549.html£¬ËµµÄ±È½ÏÏêϸ£¬±¾ÈË¿´Íêºó£¬Ö±½Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ