{"id":125,"date":"2007-09-07T16:01:01","date_gmt":"2007-09-07T08:01:01","guid":{"rendered":"http:\/\/learn-house.idv.tw\/?p=125"},"modified":"2010-01-17T19:20:44","modified_gmt":"2010-01-17T11:20:44","slug":"%e6%9c%80%e7%b0%a1%e4%be%bf%e7%9a%84%e5%82%99%e4%bb%bdmysql%e8%b3%87%e6%96%99%e5%ba%ab%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/learn-house.idv.tw\/?p=125","title":{"rendered":"\u6700\u7c21\u4fbf\u7684\u5099\u4efdMySql\u8cc7\u6599\u5eab\u65b9\u6cd5"},"content":{"rendered":"<p>\u70ba\u4e86\u540c\u6b65\u5169\u500b\u7cfb\u7d71\u7684\u7a0b\u5f0f\u8207\u8cc7\u6599\u5eab\uff0c\u56e0\u6b64\u7528phpmyadmin\u628a\u8cc7\u6599\u5eab\u532f\u51fa\u6210SQL\u6a94<\/p>\n<p>\u7136\u5f8c\u5728\u5099\u63f4Server\u532f\u5165!!\u641e\u4e86\u597d\u4e45\u7684\u8cc7\u6599\u5eab!!\u600e\u9ebc\u7528\u90fd\u6703\u6709\u4e82\u78bc<\/p>\n<p>\u5f9e\u6240\u6709\u7684\u74b0\u5883\u8b8a\u6578\u958b\u5200\uff0c\u5c0d\u7167\u4e86\u7cfb\u7d71\u8a9e\u7cfb\u3001MySQL\u8a9e\u7cfb\u3001\u8cc7\u6599\u5eab\u8cc7\u6599\u8868\u3001\u8207phpmyadmin\u8a2d\u5b9a<\/p>\n<p>\u90fd\u6539\u6210\u76f8\u540c\u4e86\u53ef\u662f\u5c31\u662f\u6709\u554f\u984c\uff0c\u5f8c\u4f86\u627e\u51fa\u539f\u56e0\u662f\u56e0\u70ba\u6211\u592a\u4f9d\u8cf4phpmyadmin\u7684\u532f\u51fa\u529f\u80fd\u4e86<\/p>\n<p>\u6240\u4ee5\u5c0e\u81f4\u532f\u5165\u5230\u53e6\u5916\u4e00\u500b\u8cc7\u6599\u6642\u662f\u932f\u8aa4\u7684\u7de8\u78bc\u683c\u5f0f <\/p>\n<p>\u4ee5\u4e0b\u662f\u7528mysqldump\u6240\u532f\u51fa\u4f86\u7684\u8cc7\u6599\u5eab\u5099\u4efd\u6642\u6240\u53ef\u4ee5\u7528\u7684\u9078\u9805<\/p>\n<p>\u5176\u5be6\u8aaa\u7a7f\u4e86\u53ea\u662f\u7528&#8211;help\u53ef\u4ee5\u770b\u5230\u7684\u6240\u6709\u9078\u9805\u53c3\u6578<\/p>\n<p>\u4e0d\u904e\u4ee5\u4e0b\u9019\u7bc7\u7684\u9078\u6a23\u8aaa\u660e\u662f\u4e2d\u6587\u7684\uff0c\u7d66\u6709\u9700\u8981\u7684\u4eba\u53c3\u8003\u770b\u770b\u5427!!<\/p>\n<div class=\"textbox-content\"> \t<span class=\"postbody\"> \u4f7f\u7528MYSQL\u9032\u884c\u8cc7\u6599\u5eab\u5099\u4efd\uff0c\u6709\u5f88\u6b63\u898f\u7684\u8cc7\u6599\u5eab\u5099\u4efd\u65b9\u6cd5\uff0c\u540c\u5176\u4ed6\u7684\u8cc7\u6599\u5eab\u4f3a\u670d\u5668\u6709\u76f8\u540c\u7684\u6982\u5ff5\uff0c\u4f46\u6709\u6c92\u6709\u60f3\u904e\uff0cMySQL\u6703\u6709\u66f4\u7c21\u6377\u7684\u4f7f\u7528\u6a94\u76ee\u9304\u7684\u5099\u4efd\u65b9\u6cd5\uff0c\u800c\u4e14\u53c8\u5feb\u6709\u597d\u3002 &nbsp;<br \/> &nbsp;<br \/> \u4e00\u3001\u8cc7\u6599\u5099\u4efd\u6377\u5f91 &nbsp;<br \/> &nbsp;<br \/> \u56e0\u70ba\u9019\u500b\u65b9\u6cd5\u6c92\u6709\u5f97\u5230\u5b98\u65b9\u6b63\u5f0f\u6587\u6a94\u7684\u9a57\u8b49\uff0c\u6211\u5011\u66ab\u7a31\u70ba\u8a66\u9a57\u5427\u3002 &nbsp;<br \/> &nbsp;<br \/> \u76ee\u7684\uff1a\u5099\u4efdhostA\u4e3b\u6a5f\u4e2d\u4e00\u500bmysql\u8cc7\u6599\u5eabTestA\uff0c\u4e26\u6062\u5fa9\u5230\u5230hostB\u6a5f\u4e2d &nbsp;<br \/> &nbsp;<br \/> \u8a66\u9a57\u74b0\u5883\uff1a &nbsp;<br \/> &nbsp;<br \/> \u4f5c\u696d\u7cfb\u7d71\uff1aWinNT4.0\uff0cMysql3.22.34\uff0cphpMyAdmin 2.1.0 &nbsp;<br \/> &nbsp;<br \/> \u5728hostA\u4e2d\u5b89\u88ddmysql\u8cc7\u6599\u5eab\u4e26\u5efa\u7acbTestA\u8cc7\u6599\u5eab &nbsp;<br \/> &nbsp;<br \/> hostB\u6a5f\u5b89\u88ddmysql\u8cc7\u6599\u5eab\uff0c\u6c92\u6709TestA\u8cc7\u6599\u5eab &nbsp;<br \/> &nbsp;<br \/> \u65b9\u6cd5\u6b65\u9a5f\uff1a &nbsp;<br \/> &nbsp;<br \/> \u555f\u52d5phpMyAdmin\u5bdf\u770bHostA\u548cHostB\u4e2d\u7684\u8cc7\u6599\u5eab\u5217\u8868\uff0c\u5728HostB\u4e2d\u6c92\u6709TestA\u8cc7\u6599\u5eab &nbsp;<br \/> &nbsp;<br \/> \u627e\u5230HostA\u4e2dmysql\u7684\u5b89\u88dd\u76ee\u9304\uff0c\u4e26\u627e\u5230\u8cc7\u6599\u5eab\u76ee\u9304data &nbsp;<br \/> &nbsp;<br \/> \u5728\u6211\u7684\u8a66\u9a57\u74b0\u5883\u4e2d\uff0c\u9019\u500b\u76ee\u9304\u662f &nbsp;<br \/> &nbsp;<br \/> C:mysqldata &nbsp;<br \/> &nbsp;<br \/> \u627e\u5230\u5c0d\u61c9\u8cc7\u6599\u5eab\u540d\u7a31\u7684\u5b50\u76ee\u9304 &nbsp;<br \/> &nbsp;<br \/> C:mysqldataTestA &nbsp;<br \/> &nbsp;<br \/> \u7c98\u8cbc\u62f7\u8c9d\u5230HostB\u7684Data\u76ee\u9304\u4e0b\uff0c\u662fHostA\u540cHostB Mysql\u8cc7\u6599\u76ee\u9304\u4e0b\u7684\u6a94\u76f8\u540c &nbsp;<br \/> &nbsp;<br \/> \u5237\u65b0HostB\u7684phpMyAdmin\u5bdf\u770b\u4e00\u4e0b\u8cc7\u6599\u5eab\u5217\u8868\uff0c\u6211\u5011\u770b\u5230TestA\u5df2\u7d93\u51fa\u73fe\uff0c\u4e26\u4e14\u4f5c\u67e5\u8a62\u4fee\u6539\u7b49\u64cd\u4f5c\u90fd\u6b63\u5e38\uff0c\u5099\u4efd\u6062\u5fa9\u6062\u5fa9\u6210\u529f &nbsp;<br \/> &nbsp;<br \/> \u8a66\u9a57\u7d50\u8ad6\uff1aMysql\u7684\u8cc7\u6599\u5eab\u53ef\u4ee5\u901a\u904e\u6a94\u5f62\u5f0f\u4fdd\u5b58\uff0c\u5099\u4efd\uff0c\u6062\u5fa9\u53ea\u8981\u5c07\u76f8\u61c9\u6a94\u76ee\u9304\u6062\u5fa9\u5373\u53ef\uff0c\u7121\u9700\u4f7f\u7528\u5176\u4ed6\u5de5\u5177\u5099\u4efd\u3002 &nbsp;<br \/> &nbsp;<br \/> \u4e8c\u3001\u6b63\u898f\u7684\u65b9\u6cd5\uff08\u5b98\u65b9\u5efa\u8b70\uff09\uff1a &nbsp;<br \/> &nbsp;<br \/> \u5c0e\u51fa\u8981\u7528\u5230MySQL\u7684mysqldump\u5de5\u5177\uff0c\u57fa\u672c\u7528\u6cd5\u662f\uff1a &nbsp;<br \/> &nbsp;<br \/> <\/span>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<\/p>\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"90%\">\n<tbody>\n<tr>\n<td><span class=\"genmed\"><strong>\u4ee3\u78bc:<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td class=\"code\"> mysqldump [OPTIONS] database [tables] &nbsp; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"postbody\"> <br \/> &nbsp;<br \/> \u5982\u679c\u4f60\u4e0d\u7d66\u5b9a\u4efb\u4f55\u8868\uff0c\u6574\u500b\u8cc7\u6599\u5eab\u5c07\u88ab\u5c0e\u51fa\u3002 &nbsp;<br \/> &nbsp;<br \/> \u901a\u904e\u57f7\u884cmysqldump &#8211;help\uff0c\u4f60\u80fd\u5f97\u5230\u4f60mysqldump\u7684\u7248\u672c\u652f\u63f4\u7684\u9078\u9805\u8868\u3002 &nbsp;<br \/> &nbsp;<br \/> \u6ce8\u610f\uff0c\u5982\u679c\u4f60\u904b\u884cmysqldump\u6c92\u6709&#8211;quick\u6216&#8211;opt\u9078\u9805\uff0cmysqldump\u5c07\u5728\u5c0e\u51fa\u7d50\u679c\u524d\u88dd\u8f09\u6574\u500b\u7d50\u679c\u96c6\u5230\u8a18\u61b6\u9ad4\u4e2d\uff0c\u5982\u679c\u4f60\u6b63\u5728\u5c0e\u51fa\u4e00\u500b\u5927\u7684\u8cc7\u6599\u5eab\uff0c\u9019\u5c07\u53ef\u80fd\u662f\u4e00\u500b\u554f\u984c\u3002 &nbsp;<br \/> &nbsp;<br \/> mysqldump\u652f\u63f4\u4e0b\u5217\u9078\u9805\uff1a &nbsp;<br \/> &nbsp;<br \/> &#8211;add-locks &nbsp;<br \/> &nbsp;<br \/> \u5728\u6bcf\u500b\u8868\u5c0e\u51fa\u4e4b\u524d\u589e\u52a0LOCK TABLES\u4e26\u4e14\u4e4b\u5f8cUNLOCK TABLE\u3002(\u70ba\u4e86\u4f7f\u5f97\u66f4\u5feb\u5730\u63d2\u5165\u5230MySQL)\u3002 &nbsp;<br \/> &nbsp;<br \/> &#8211;add-drop-table &nbsp;<br \/> &nbsp;<br \/> \u5728\u6bcf\u500bcreate\u8a9e\u53e5\u4e4b\u524d\u589e\u52a0\u4e00\u500bdrop table\u3002 &nbsp;<br \/> &nbsp;<br \/> &#8211;allow-keywords &nbsp;<br \/> &nbsp;<br \/> \u5141\u8a31\u5275\u5efa\u662f\u95dc\u9375\u5b57\u7684\u5217\u540d\u5b57\u3002\u9019\u7531\u5728\u5217\u540d\u524d\u9762\u52a0\u8868\u540d\u7684\u65b9\u6cd5\u505a\u5230\u3002 &nbsp;<br \/> &nbsp;<br \/> -c, &#8211;complete-insert &nbsp;<br \/> &nbsp;<br \/> \u4f7f\u7528\u5b8c\u6574\u7684insert\u8a9e\u53e5(\u7528\u5217\u540d\u5b57)\u3002 &nbsp;<br \/> &nbsp;<br \/> -C, &#8211;compress &nbsp;<br \/> &nbsp;<br \/> \u5982\u679c\u5ba2\u6236\u548c\u4f3a\u670d\u5668\u5747\u652f\u63f4\u58d3\u7e2e\uff0c\u58d3\u7e2e\u5169\u8005\u9593\u6240\u6709\u7684\u8cc7\u8a0a\u3002 &nbsp;<br \/> &nbsp;<br \/> &#8211;delayed &nbsp;<br \/> &nbsp;<br \/> \u7528INSERT DELAYED\u547d\u4ee4\u63d2\u5165\u884c\u3002 &nbsp;<br \/> &nbsp;<br \/> -e, &#8211;extended-insert &nbsp;<br \/> &nbsp;<br \/> \u4f7f\u7528\u5168\u65b0\u591a\u884cINSERT\u8a9e\u6cd5\u3002\uff08\u7d66\u51fa\u66f4\u7dca\u7e2e\u4e26\u4e14\u66f4\u5feb\u7684\u63d2\u5165\u8a9e\u53e5\uff09 &nbsp;<br \/> &nbsp;<br \/> -#, &#8211;debug[=option_string] &nbsp;<br \/> &nbsp;<br \/> \u8ddf\u8e64\u7a0b\u5f0f\u7684\u4f7f\u7528(\u70ba\u4e86\u8abf\u8a66)\u3002 &nbsp;<br \/> &nbsp;<br \/> &#8211;help &nbsp;<br \/> &nbsp;<br \/> \u986f\u793a\u4e00\u689d\u5e6b\u52a9\u6d88\u606f\u4e26\u4e14\u9000\u51fa\u3002 &nbsp;<br \/> &nbsp;<br \/> &#8211;fields-terminated-by=&#8230; &nbsp;<br \/> &nbsp;<br \/> &#8211;fields-enclosed-by=&#8230; &nbsp;<br \/> &nbsp;<br \/> &#8211;fields-optionally-enclosed-by=&#8230; &nbsp;<br \/> &nbsp;<br \/> &#8211;fields-escaped-by=&#8230; &nbsp;<br \/> &nbsp;<br \/> &#8211;fields-terminated-by=&#8230; &nbsp;<br \/> &nbsp;<br \/> \u9019\u4e9b\u9078\u64c7\u8207-T\u9078\u64c7\u4e00\u8d77\u4f7f\u7528\uff0c\u4e26\u4e14\u6709\u76f8\u61c9\u7684LOAD DATA INFILE\u5b50\u53e5\u76f8\u540c\u7684\u542b\u7fa9\u3002 &nbsp;<br \/> &nbsp;<br \/> LOAD DATA INFILE\u8a9e\u6cd5\u3002 &nbsp;<br \/> &nbsp;<br \/> -F, &#8211;flush-logs &nbsp;<br \/> &nbsp;<br \/> \u5728\u958b\u59cb\u5c0e\u51fa\u524d\uff0c\u6d17\u6389\u5728MySQL\u4f3a\u670d\u5668\u4e2d\u7684\u65e5\u8a8c\u6a94\u3002 &nbsp;<br \/> &nbsp;<br \/> -f, &#8211;force, &nbsp;<br \/> &nbsp;<br \/> \u5373\u4f7f\u6211\u5011\u5728\u4e00\u500b\u8868\u5c0e\u51fa\u671f\u9593\u5f97\u5230\u4e00\u500bSQL\u932f\u8aa4\uff0c\u7e7c\u7e8c\u3002 &nbsp;<br \/> &nbsp;<br \/> -h, &#8211;host=.. &nbsp;<br \/> &nbsp;<br \/> \u5f9e\u547d\u540d\u7684\u4e3b\u6a5f\u4e0a\u7684MySQL\u4f3a\u670d\u5668\u5c0e\u51fa\u8cc7\u6599\u3002\u7f3a\u7701\u4e3b\u6a5f\u662flocalhost\u3002 &nbsp;<br \/> &nbsp;<br \/> -l, &#8211;lock-tables. &nbsp;<br \/> &nbsp;<br \/> \u70ba\u958b\u59cb\u5c0e\u51fa\u9396\u5b9a\u6240\u6709\u8868\u3002 &nbsp;<br \/> &nbsp;<br \/> -t, &#8211;no-create-info &nbsp;<br \/> &nbsp;<br \/> \u4e0d\u5beb\u5165\u8868\u5275\u5efa\u8cc7\u8a0a(CREATE TABLE\u8a9e\u53e5\uff09 &nbsp;<br \/> &nbsp;<br \/> -d, &#8211;no-data &nbsp;<br \/> &nbsp;<br \/> \u4e0d\u5beb\u5165\u8868\u7684\u4efb\u4f55\u884c\u8cc7\u8a0a\u3002\u5982\u679c\u4f60\u53ea\u60f3\u5f97\u5230\u4e00\u500b\u8868\u7684\u7d50\u69cb\u7684\u5c0e\u51fa\uff0c\u9019\u662f\u5f88\u6709\u7528\u7684\uff01 &nbsp;<br \/> &nbsp;<br \/> &#8211;opt &nbsp;<br \/> &nbsp;<br \/> \u540c&#8211;quick &#8211;add-drop-table &#8211;add-locks &#8211;extended-insert &#8211;lock-tables\u3002 &nbsp;<br \/> &nbsp;<br \/> \u61c9\u8a72\u7d66\u4f60\u70ba\u8b80\u5165\u4e00\u500bMySQL\u4f3a\u670d\u5668\u7684\u76e1\u53ef\u80fd\u6700\u5feb\u7684\u5c0e\u51fa\u3002 &nbsp;<br \/> &nbsp;<br \/> -pyour_pass, &#8211;password[=your_pass] &nbsp;<br \/> &nbsp;<br \/> \u8207\u4f3a\u670d\u5668\u9023\u63a5\u6642\u4f7f\u7528\u7684\u53e3\u4ee4\u3002\u5982\u679c\u4f60\u4e0d\u6307\u5b9a&ldquo;=your_pass&rdquo;\u90e8\u5206\uff0cmysqldump\u9700\u8981\u4f86\u81ea\u7d42\u7aef\u7684\u53e3\u4ee4\u3002 &nbsp;<br \/> &nbsp;<br \/> -P port_num, &#8211;port=port_num &nbsp;<br \/> &nbsp;<br \/> \u8207\u4e00\u53f0\u4e3b\u6a5f\u9023\u63a5\u6642\u4f7f\u7528\u7684TCP\/IP\u57e0\u865f\u3002\uff08\u9019\u7528\u65bc\u9023\u63a5\u5230localhost\u4ee5\u5916\u7684\u4e3b\u6a5f\uff0c\u56e0\u70ba\u5b83\u4f7f\u7528 Unix\u5957\u63a5\u5b57\u3002\uff09 &nbsp;<br \/> &nbsp;<br \/> -q, &#8211;quick &nbsp;<br \/> &nbsp;<br \/> \u4e0d\u7de9\u885d\u67e5\u8a62\uff0c\u76f4\u63a5\u5c0e\u51fa\u81f3stdout\uff1b\u4f7f\u7528mysql_use_result()\u505a\u5b83\u3002 &nbsp;<br \/> &nbsp;<br \/> -S \/path\/to\/socket, &#8211;socket=\/path\/to\/socket &nbsp;<br \/> &nbsp;<br \/> \u8207localhost\u9023\u63a5\u6642\uff08\u5b83\u662f\u7f3a\u7701\u4e3b\u6a5f)\u4f7f\u7528\u7684\u5957\u63a5\u5b57\u6a94\u3002 &nbsp;<br \/> &nbsp;<br \/> -T, &#8211;tab=path-to-some-directory &nbsp;<br \/> &nbsp;<br \/> \u5c0d\u65bc\u6bcf\u500b\u7d66\u5b9a\u7684\u8868\uff0c\u5275\u5efa\u4e00\u500btable_name.sql\u6a94\uff0c\u5b83\u5305\u542bSQL CREATE \u547d\u4ee4\uff0c\u548c\u4e00\u500btable_name.txt\u6a94\uff0c\u5b83\u5305\u542b\u8cc7\u6599\u3002 \u6ce8\u610f\uff1a\u9019\u53ea\u6709\u5728mysqldump\u904b\u884c\u5728mysqld\u5b88\u8b77\u9032\u7a0b\u904b\u884c\u7684\u540c\u4e00\u53f0\u6a5f\u5668\u4e0a\u7684\u6642\u5019\u624d\u5de5\u4f5c\u3002.txt\u6a94\u7684\u683c\u5f0f\u6839\u64da&#8211;fields-xxx\u548c&#8211; lines&#8211;xxx\u9078\u9805\u4f86\u5b9a\u3002 <br \/> &nbsp;<br \/> -u user_name, &#8211;user=user_name &nbsp;<br \/> &nbsp;<br \/> \u8207\u4f3a\u670d\u5668\u9023\u63a5\u6642\uff0cMySQL\u4f7f\u7528\u7684\u7528\u6236\u540d\u3002\u7f3a\u7701\u503c\u662f\u4f60\u7684Unix\u767b\u9304\u540d\u3002 &nbsp;<br \/> &nbsp;<br \/> -O var=option, &#8211;set-variable var=option &nbsp;<br \/> &nbsp;<br \/> \u8a2d\u7f6e\u4e00\u500b\u8b8a\u6578\u7684\u503c\u3002\u53ef\u80fd\u7684\u8b8a\u6578\u88ab\u5217\u5728\u4e0b\u9762\u3002 &nbsp;<br \/> &nbsp;<br \/> -v, &#8211;verbose &nbsp;<br \/> &nbsp;<br \/> \u5197\u9577\u6a21\u5f0f\u3002\u5217\u5370\u51fa\u7a0b\u5f0f\u6240\u505a\u7684\u66f4\u591a\u7684\u8cc7\u8a0a\u3002 &nbsp;<br \/> &nbsp;<br \/> -V, &#8211;version &nbsp;<br \/> &nbsp;<br \/> \u5217\u5370\u7248\u672c\u8cc7\u8a0a\u4e26\u4e14\u9000\u51fa\u3002 &nbsp;<br \/> &nbsp;<br \/> -w, &#8211;where=&#39;where-condition&#39; &nbsp;<br \/> &nbsp;<br \/> \u53ea\u5c0e\u51fa\u88ab\u9078\u64c7\u4e86\u7684\u8a18\u9304\uff1b\u6ce8\u610f\u5f15\u865f\u662f\u5f37\u5236\u7684\uff01 &nbsp;<br \/> &nbsp;<br \/> &quot;&#8211;where=user=&#39;jimf&#39;&quot; &quot;-wuserid&gt;1&quot; &quot;-wuserid&lt;1&quot; &nbsp;<br \/> &nbsp;<br \/> \u6700\u5e38\u898b\u7684mysqldump\u4f7f\u7528\u53ef\u80fd\u88fd\u4f5c\u6574\u500b\u8cc7\u6599\u5eab\u7684\u4e00\u500b\u5099\u4efd\uff1a &nbsp;<br \/> &nbsp;<br \/> <\/span>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<\/p>\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"90%\">\n<tbody>\n<tr>\n<td><span class=\"genmed\"><strong>\u4ee3\u78bc:<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td class=\"code\"> mysqldump &#8211;opt database &gt; backup-file.sql &nbsp; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"postbody\"> <br \/> &nbsp;<br \/> \u4f46\u662f\u5b83\u5c0d\u7528\u4f86\u81ea\u65bc\u4e00\u500b\u8cc7\u6599\u5eab\u7684\u8cc7\u8a0a\u5145\u5be6\u53e6\u5916\u4e00\u500bMySQL\u8cc7\u6599\u5eab\u4e5f\u662f\u6709\u7528\u7684\uff1a &nbsp;<br \/> &nbsp;<br \/> <\/span>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<\/p>\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"90%\">\n<tbody>\n<tr>\n<td><span class=\"genmed\"><strong>\u4ee3\u78bc:<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td class=\"code\"> mysqldump &#8211;opt database | mysql &#8211;host=remote-host -C database &nbsp; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"postbody\"> <br \/> &nbsp;<br \/> \u7531\u65bcmysqldump\u5c0e\u51fa\u7684\u662f\u5b8c\u6574\u7684SQL\u8a9e\u53e5\uff0c\u6240\u4ee5\u7528mysql\u5ba2\u6236\u7a0b\u5f0f\u5f88\u5bb9\u6613\u5c31\u80fd\u628a\u8cc7\u6599\u5c0e\u5165\u4e86\uff1a &nbsp;<br \/> &nbsp;<br \/> <\/span>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<\/p>\n<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"90%\">\n<tbody>\n<tr>\n<td><span class=\"genmed\"><strong>\u4ee3\u78bc:<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td class=\"code\"> mysqladmin create target_db_name &nbsp;<br \/> &nbsp;<br \/> mysql target_db_name &lt; backup-file.sql &nbsp; <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"postbody\"> <br \/> &nbsp;<br \/> <a href=\"http:\/\/tech.ccidnet.com\/art\/1105\/20050804\/303341_1.html\" target=\"_blank\">http:\/\/tech.ccidnet.com\/art\/1105\/20050804\/303341_1.html<\/a><br \/><a href=\"http:\/\/ria.richtechmedia.com\/category\/phpmysql\/\" target=\"_blank\">http:\/\/ria.richtechmedia.com\/category\/phpmysql\/<\/a><br \/><\/span> <\/div>\n<div class=\"tags\" style=\"display: none\">   \t<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u70ba\u4e86\u540c\u6b65\u5169\u500b\u7cfb\u7d71\u7684\u7a0b\u5f0f\u8207\u8cc7\u6599\u5eab\uff0c\u56e0\u6b64\u7528phpmyadmin\u628a\u8cc7\u6599\u5eab\u532f\u51fa\u6210SQL\u6a94 \u7136\u5f8c\u5728\u5099\u63f4Server\u532f\u5165!<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/learn-house.idv.tw\/?p=125\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-125","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=125"}],"version-history":[{"count":0,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/125\/revisions"}],"wp:attachment":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}