{"id":1508,"date":"2020-08-31T23:00:00","date_gmt":"2020-08-31T19:30:00","guid":{"rendered":"https:\/\/parsdev.com\/wpblog\/database-migrate\/"},"modified":"2025-07-28T08:54:26","modified_gmt":"2025-07-28T05:24:26","slug":"database-migrate","status":"publish","type":"post","link":"https:\/\/parsdev.com/blog\/database-migrate\/","title":{"rendered":"\u0627\u0646\u062a\u0642\u0627\u0644 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 MySQL"},"content":{"rendered":"<p>\u0627\u0646\u062a\u0642\u0627\u0644 \u06cc\u0627 \u0645\u0627\u06cc\u06af\u0631\u06cc\u0634\u0646 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647\u0627 MySQL \/ MariaDB \u0628\u06cc\u0646 \u0633\u0631\u0648\u0631\u0647\u0627 \u0645\u0639\u0645\u0648\u0644\u0627 \u0641\u0642\u0637 \u0686\u0646\u062f \u0645\u0631\u062d\u0644\u0647 \u0637\u0648\u0644 \u0645\u06cc \u06a9\u0634\u062f\u060c \u0627\u0645\u0627 \u0627\u0646\u062a\u0642\u0627\u0644 \u062f\u0627\u062f\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u062f \u0628\u0633\u062a\u0647 \u0628\u0647 \u062d\u062c\u0645 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0627\u0646\u062a\u0642\u0627\u0644 \u062f\u0647\u06cc\u062f\u060c \u0632\u0645\u0627\u0646 \u0628\u0628\u0631\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0628\u0627 \u0646\u062d\u0648\u0647 \u0627\u0646\u062a\u0642\u0627\u0644 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0647\u0645\u0631\u0627\u0647 \u0634\u0645\u0627 \u0647\u0633\u062a\u06cc\u0645.<br \/>\n&nbsp;<\/p>\n<p>\u062f\u0631 \u0627\u0628\u062a\u062f\u0627\u060c&nbsp; \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0647\u0645\u0627\u0646 \u0646\u0633\u062e\u0647 MySQL \u0631\u0627 \u062f\u0631 \u0647\u0631 \u062f\u0648 \u0633\u0631\u0648\u0631 \u0628\u0627 \u0647\u0645\u0627\u0646 \u062a\u0648\u0632\u06cc\u0639 \u0646\u0635\u0628 \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f.<br \/>\n&nbsp; \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0641\u0636\u0627\u06cc \u0622\u0632\u0627\u062f \u0628\u0647 \u0627\u0646\u062f\u0627\u0632\u0647 \u062d\u062c\u0645 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u062f\u0631 \u0647\u0631 \u062f\u0648 \u0633\u0631\u0648\u0631 \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.<br \/>\n&nbsp;<\/p>\n<p><strong>\u0627\u06a9\u0633\u067e\u0648\u0631\u062a \u06cc\u06a9 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 mysql<\/strong><\/p>\n<p>\u0627\u0628\u062a\u062f\u0627 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0642\u062f\u06cc\u0645\u06cc \u062e\u0648\u062f \u0644\u0627\u06af\u06cc\u0646 \u06a9\u0646\u06cc\u062f \u0648 \u062a\u0645\u0627\u0645 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc MySQL \u062e\u0648\u062f \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 mysqldump \u062e\u0631\u0648\u062c\u06cc \u0628\u06af\u06cc\u0631\u06cc\u062f..<\/p>\n<pre> <code>\r\n&nbsp;mysqldump -u [user] -p &ndash;all-databases &gt; all_databases.sql\r\n<\/code><\/pre>\n<p>\u067e\u0633 \u0627\u0632 \u062a\u06a9\u0645\u06cc\u0644\u060c \u0634\u0645\u0627 \u0622\u0645\u0627\u062f\u0647 \u0627\u0646\u062a\u0642\u0627\u0644 \u067e\u0627\u06cc\u06af\u0627\u0647 \u0647\u0627\u06cc \u062f\u0627\u062f\u0647 \u0647\u0633\u062a\u06cc\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u062e\u0631\u0648\u062c\u06cc \u06af\u0631\u0641\u062a\u0646 \u0627\u0632 \u06cc\u06a9 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u062e\u0627\u0635 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0639\u0645\u0644 \u0646\u0645\u0627\u06cc\u06cc\u062f :<\/p>\n<pre> <code>mysqldump -u root -p --opt [database name] &gt; database_name.sql\r\n<\/code><\/pre>\n<p>\n<strong>\u0627\u0646\u062a\u0642\u0627\u0644 \u0641\u0627\u06cc\u0644 \u062f\u0627\u0645\u067e \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 MySQL \u0628\u0647 \u0633\u0631\u0648\u0631 \u062c\u062f\u06cc\u062f<\/strong><\/p>\n<p>\u062d\u0627\u0644\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 scp \u0641\u0627\u06cc\u0644 sql \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0631\u0627 \u0628\u0647 \u0633\u0631\u0648\u0631 \u062c\u062f\u06cc\u062f \u0627\u0646\u062a\u0642\u0627\u0644 \u0645\u06cc \u062f\u0647\u06cc\u0645.<\/p>\n<blockquote>\n<p dir=\"ltr\">&nbsp;scp all_databases.sql user@example.com:~\/&nbsp; &nbsp; &nbsp;<br \/>\n&nbsp;<\/p>\n<\/blockquote>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062a\u0635\u0627\u0644\u060c \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0628\u0647 \u0633\u0631\u0648\u0631 \u062c\u062f\u06cc\u062f \u0645\u0646\u062a\u0642\u0644 \u062e\u0648\u0627\u0647\u062f \u0634\u062f.<\/p>\n<p>\n<strong>\u0627\u06cc\u0645\u067e\u0648\u0631\u062a \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u062f\u0631 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 MySQL&nbsp; &nbsp;\u0633\u0631\u0648\u0631 \u062c\u062f\u06cc\u062f<\/strong><\/p>\n<p>\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0628\u0647 \u0633\u0631\u0648\u0631 \u062c\u062f\u06cc\u062f \u0645\u0646\u062a\u0642\u0644 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0645\u067e\u0648\u0631\u062a \u062a\u0645\u0627\u0645 \u067e\u0627\u06cc\u06af\u0627\u0647 \u0647\u0627\u06cc \u062f\u0627\u062f\u0647 \u062e\u0648\u062f \u0628\u0647 MySQL \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre> <code>mysql -u [user] -p &ndash;all-databases &lt; all_databases.sql&nbsp;<br \/><\/code><\/pre>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062a\u0645\u0627\u0645 \u0627\u06cc\u0645\u067e\u0648\u0631\u062a\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0647\u0627 \u0631\u0627 \u062f\u0631 \u0647\u0631 \u062f\u0648 \u0633\u0631\u0648\u0631 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u062f\u0631 \u067e\u0648\u0633\u062a\u0647 mysql \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre> <code>&nbsp;mysql -u user -p<br \/>\r\n&nbsp;show databases;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u0627\u0646\u062a\u0642\u0627\u0644 \u06cc\u0627 \u0645\u0627\u06cc\u06af\u0631\u06cc\u0634\u0646 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647\u0627 MySQL \/ MariaDB \u0628\u06cc\u0646 \u0633\u0631\u0648\u0631\u0647\u0627 \u0645\u0639\u0645\u0648\u0644\u0627 \u0641\u0642\u0637 \u0686\u0646\u062f \u0645\u0631\u062d\u0644\u0647 \u0637\u0648\u0644 \u0645\u06cc \u06a9\u0634\u062f\u060c \u0627\u0645\u0627&hellip;","protected":false},"author":1,"featured_media":1507,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-1508","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-gen","8":"cs-entry"},"_links":{"self":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts\/1508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/comments?post=1508"}],"version-history":[{"count":1,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions"}],"predecessor-version":[{"id":5765,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions\/5765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/media\/1507"}],"wp:attachment":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/media?parent=1508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/categories?post=1508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/tags?post=1508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}