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

mysql µ¼Êý¾Ý¿âÃüÁî

mysql µ¼Êý¾Ý¿âÃüÁî
mysqlÃüÁîµ¼Êý¾Ý¿â½Å±¾¡£
mysql>create database databaseName
mysql>use yourDatabase
mysql>source d:yourSql.sql
=========================
1.mysql -u root -p Javascript:tagshow(event, '%CA%FD%BE%DD%BF%E2');" href="http://www.xland.com.cn/article/74/76/0704/Javascript:;" target=_self>Êý¾Ý¿âÃû </Îļþ·¾¶(ÔÚbinϾÍÖ±½Ó¼ÓÎļþÃû)
2.mysqlimportµÄÓï·¨½éÉÜ£º
mysqlimport λÓÚmysql/binĿ¼ÖУ¬ÊÇJavascript:tagshow(event, 'mysql');" href="http://www.xland.com.cn/article/74/76/0704/Javascript:;" target=_self>mysqlµÄÒ»¸öÔØÈ루»òÕß˵Javascript:tagshow(event, '%B5%BC%C8%EB');" href="http://www.xland.com.cn/article/74/76/0704/Javascript:;" target=_self>µ¼È룩Êý¾ÝµÄÒ»¸ö·Ç³£ÓÐЧµÄ¹¤¾ß¡£ÕâÊÇÒ»¸öÃüÁîÐй¤¾ß¡£ÓÐÁ½¸ö²ÎÊýÒÔ¼°´óÁ¿µÄÑ¡Ïî¿É¹©Ñ¡Ôñ¡£Õâ¸ö¹¤¾ß°ÑÒ»¸öÎı¾Îļþ £¨text file£©µ¼Èëµ½ÄãÖ¸¶¨µÄÊý¾Ý¿âºÍ±íÖС£±È·½ËµÎÒÃÇÒª´ÓÎļþCustomers.txtÖаÑÊý¾Ýµ¼Èëµ½Êý¾Ý¿âMeet_A_GeekÖеıí CustermersÖУº
mysqlimport Meet_A_Geek Customers.txt
×¢Ò⣺ÕâÀïCustomers.txtÊÇÎÒÃÇÒªµ¼ÈëÊý¾ÝµÄÎı¾Îļþ£¬¶øMeet_A_GeekÊÇÎÒÃÇÒª²Ù×÷µÄÊý¾Ý¿â£¬Êý¾Ý¿âÖеıíÃûÊÇCustomers£¬ÕâÀïÎı¾ÎļþµÄÊý¾Ý¸ñʽ±ØÐëÓëCustomers±íÖеļǼ¸ñʽһÖ£¬·ñÔòmysqlimportÃüÁ»á³ö´í¡£
ÆäÖбíµÄÃû×ÖÊǵ¼ÈëÎļþµÄµÚÒ»¸ö¾äºÅ£¨.£©Ç°ÃæÎļþ×Ö·û´®£¬ÁíÍâÒ»¸öÀý×Ó£º
mysqlimport Meet_A_Geek Cus.to.mers.txt
ÄÇôÎÒÃǽ«°ÑÎļþÖеÄÄÚÈݵ¼Èëµ½Êý¾Ý¿âMeet_A_Geek ÖеÄCus±íÖС£ÉÏÃæµÄÀý×ÓÖУ¬¶¼Ö»Óõ½Á½¸ö²ÎÊý£¬²¢Ã»ÓÐÓõ½¸ü¶àµÄÑ¡ÏÏÂÃæ½éÉÜmysqlimportµÄÑ¡Ïî:
    Ñ¡Ïî             ¹¦ÄÜ
-d or --delete     ÐÂÊý¾Ýµ¼ÈëÊý¾Ý±íÖÐ֮ǰɾ³ýÊý¾ÝÊý¾Ý±íÖеÄËùÓÐÐÅÏ¢
-f or --force     ²»¹ÜÊÇ·ñÓöµ½´íÎó£¬mysqlimport½«Ç¿ÖƼÌÐø²åÈëÊý¾Ý
-i or --ignore     mysqlimportÌø¹ý»òÕߺöÂÔÄÇЩÓÐÏàͬΨһ¹Ø¼ü×ÖµÄÐУ¬ µ¼ÈëÎļþÖеÄÊý¾Ý½«±»ºöÂÔ¡£
-l or -lock-tables Êý¾Ý±»²åÈë֮ǰËøס±í£¬ÕâÑù¾Í·ÀÖ¹ÁË£¬ÄãÔÚ¸üÐÂÊý¾Ý¿âʱ£¬Óû§µÄ²éѯºÍ¸üÐÂÊܵ½Ó°Ïì¡£
-r or -replace     Õâ¸öÑ¡ÏîÓ룭iÑ¡ÏîµÄ×÷ÓÃÏà·´£»´ËÑ¡ÏÌæ´ú±íÖÐÓÐ


Ïà¹ØÎĵµ£º

mysql JDBC URL¸ñʽ¼°Æä²ÎÊý˵Ã÷

×î½üÓöµ½ÕâÑùµÄÎÊÌâ
»á±¨at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQuery ......

mysql µ¼³öÊý¾Ý¿â

     ½øÈëcmd
     ===================
     1.µ¼³öÊý¾Ý¿â£¨sql½Å±¾£©
     mysqldump -u Óû§Ãû -p Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû
¡¡¡¡mysqldump -u root -p db_name > test_db.sql
¡¡¡¡2.mysqlµ¼³öÊý¾Ý¿âÒ ......

Mysql µÄһЩ¼òµ¥µÄÃüÁî

¼ÇÏÂЩlinuxÏÂmysqlµÄ²Ù×÷£¬ÒÔ±ãÒÔºó²é¿´£º
1. Æô¶¯£¬¹Ø±Õmysql£º
Æô¶¯£ºsudo /etc/init.d/mysql start
¹Ø±Õ£º/usr/bin/mysqladmin -uroot -p shutdown
2.ÏÔʾ ±í½á¹¹£º
describe:tableName
3.±¸·Ý£º
Ö»±¸·Ý±í½á¹¹£ºmysqldump -d -uroot -p  DataBase TableName> xxx.sql
±¸·Ý±í½á¹¹ºÍÊý¾Ý£ºmysqldump -uro ......

MysqlµÄ±¸·ÝÓ뻹ԭ

MySQL ±¸·ÝºÍ»Ö¸´



ÖÜÁù, 2006/09/30 - 14:21 — yejr
MySQL ±¸·ÝºÍ»Ö¸´
×÷/ÒëÕߣºÒ¶½ðÈÙ£¨Email:
£©£¬À´Ô´£ºhttp://imysql.cn
£¬×ªÔØÇë×¢Ã÷×÷/ÒëÕߺͳö´¦£¬²¢ÇÒ²»ÄÜÓÃÓÚÉÌÒµÓÃ;£¬Î¥Õ߱ؾ¿¡£
ÈÕÆÚ£º2006/10/01
±¾ÎÄÌÖÂÛ MySQL µÄ±¸·ÝºÍ»Ö¸´»úÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ