{"id":4564,"date":"2019-08-09T00:39:38","date_gmt":"2019-08-08T16:39:38","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4564"},"modified":"2019-08-09T00:39:40","modified_gmt":"2019-08-08T16:39:40","slug":"mysqldump","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/mysqldump","title":{"rendered":"mysqldump\u547d\u4ee4 – MySQL\u6570\u636e\u5e93\u5907\u4efd"},"content":{"rendered":"\n
mysqldump\u547d\u4ee4\u662fMySQL\u6570\u636e\u5e93\u4e2d\u5907\u4efd\u5de5\u5177\uff0c\u7528\u4e8e\u5c06MySQL\u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u5e93\u4ee5\u6807\u51c6\u7684sql\u8bed\u8a00\u7684\u65b9\u5f0f\u5bfc\u51fa\uff0c\u5e76\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u3002 <\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f:<\/strong> mysqldump [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u5bfc\u51fa\u6574\u4e2a\u6570\u636e\u5e93\uff1a<\/p>\n\n\n\n \u5bfc\u51fa\u6570\u636e\u5e93\u4e2d\u7684\u4e00\u4e2a\u8868\uff1a<\/p>\n\n\n\n \u5bfc\u51fa\u4e00\u4e2a\u6570\u636e\u5e93\u7ed3\u6784\uff1a<\/p>\n\n\n\n mysqldump\u547d\u4ee4\u662fMySQL\u6570\u636e\u5e93\u4e2d\u5907\u4efd\u5de5\u5177\uff0c\u7528\u4e8e\u5c06MySQL\u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u5e93\u4ee5\u6807\u51c6\u7684sql\u8bed\u8a00\u7684\u65b9\u5f0f\u5bfc […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4564"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4564"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4564\/revisions"}],"predecessor-version":[{"id":4594,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4564\/revisions\/4594"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-- -add-drop-table<\/td> \u5728\u6bcf\u4e2a\u521b\u5efa\u6570\u636e\u5e93\u8868\u8bed\u53e5\u524d\u6dfb\u52a0\u5220\u9664\u6570\u636e\u5e93\u8868\u7684\u8bed\u53e5<\/td><\/tr> -- -add-locks<\/td> \u5907\u4efd\u6570\u636e\u5e93\u8868\u65f6\u9501\u5b9a\u6570\u636e\u5e93\u8868<\/td><\/tr> -- -all-databases<\/td> \u5907\u4efdMySQL\u670d\u52a1\u5668\u4e0a\u7684\u6240\u6709\u6570\u636e\u5e93<\/td><\/tr> -- -comments<\/td> \u6dfb\u52a0\u6ce8\u91ca\u4fe1\u606f<\/td><\/tr> -- -compact<\/td> \u538b\u7f29\u6a21\u5f0f\uff0c\u4ea7\u751f\u66f4\u5c11\u7684\u8f93\u51fa<\/td><\/tr> -- -complete-insert<\/td> \u8f93\u51fa\u5b8c\u6210\u7684\u63d2\u5165\u8bed\u53e5<\/td><\/tr> -- -databases<\/td> \u6307\u5b9a\u8981\u5907\u4efd\u7684\u6570\u636e\u5e93<\/td><\/tr> -- -default-character-set<\/td> \u6307\u5b9a\u9ed8\u8ba4\u5b57\u7b26\u96c6<\/td><\/tr> -- -force<\/td> \u5f53\u51fa\u73b0\u9519\u8bef\u65f6\u4ecd\u7136\u7ee7\u7eed\u5907\u4efd\u64cd\u4f5c<\/td><\/tr> -- -host<\/td> \u6307\u5b9a\u8981\u5907\u4efd\u6570\u636e\u5e93\u7684\u670d\u52a1\u5668<\/td><\/tr> -- -lock-tables<\/td> \u5907\u4efd\u524d\uff0c\u9501\u5b9a\u6240\u6709\u6570\u636e\u5e93\u8868<\/td><\/tr> -- -no-create-db<\/td> \u7981\u6b62\u751f\u6210\u521b\u5efa\u6570\u636e\u5e93\u8bed\u53e5<\/td><\/tr> -- -no-create-info<\/td> \u7981\u6b62\u751f\u6210\u521b\u5efa\u6570\u636e\u5e93\u5e93\u8868\u8bed\u53e5<\/td><\/tr> -- -password<\/td> \u8fde\u63a5MySQL\u670d\u52a1\u5668\u7684\u5bc6\u7801<\/td><\/tr> -- -port<\/td> MySQL\u670d\u52a1\u5668\u7684\u7aef\u53e3\u53f7<\/td><\/tr> -- -user<\/td> \u8fde\u63a5MySQL\u670d\u52a1\u5668\u7684\u7528\u6237\u540d<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# mysqldump -u linuxcool -p smgp_apps_linuxcool > linuxcool.sql<\/pre>\n\n\n\n
[root@linuxcool ~]# mysqldump -u linuxcool -p smgp_apps_linuxcool users > linuxcool_users.sql<\/pre>\n\n\n\n
[root@linuxcool ~]# mysqldump -u linuxcool -p -d --add-drop-table smgp_apps_linuxcool > linuxcool_db.sql<\/pre>\n","protected":false},"excerpt":{"rendered":"