{"id":5621,"date":"2017-02-09T02:01:16","date_gmt":"2017-02-09T09:01:16","guid":{"rendered":"http:\/\/www.mysqltutorial.org\/?page_id=5621"},"modified":"2023-12-26T20:41:49","modified_gmt":"2023-12-27T03:41:49","slug":"mysql-copy-database","status":"publish","type":"page","link":"https:\/\/www.mysqltutorial.org\/mysql-administration\/mysql-copy-database\/","title":{"rendered":"How To Copy a MySQL Database"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: This tutorial shows you how to copy a MySQL database on the same MySQL server and from one server to another.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Copy a MySQL database on the same server<\/h2>\n\n\n\n<p>Assuming that you have the mysqldump and mysql client tools already installed on your computer or the database server, you can proceed with executing them.<\/p>\n\n\n\n<p>If these tools are installed on your local machine, you can run the commands directly. Otherwise, if the tools are located on the database server, you&#8217;ll need to connect to the server to execute the commands.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright\"><a href=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"190\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database-300x190.jpg\" alt=\"Copy MySQL Database\" class=\"wp-image-5623\" title=\"Copy MySQL Database\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database-300x190.jpg 300w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>To copy a MySQL database, you need to follow these steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, <a href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-create-database\/\">create a new database<\/a> using <code>CREATE DATABASE<\/code> statement.<\/li>\n\n\n\n<li>Second, export all a database from which you want to copy using <code>mysqldump<\/code> tool to a SQL dump file.<\/li>\n\n\n\n<li>Third, import the SQL dump file into the new database using the <code>mysql<\/code> tool.<\/li>\n<\/ul>\n\n\n\n<p>The following picture illustrates the steps:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/12\/mysql-copy-database-within-one-server.svg\" alt=\"mysql copy database MySQL one server\" class=\"wp-image-13516\"\/><\/figure>\n<\/div>\n\n\n<p>For the demonstration, we will copy the <code>classicmodels<\/code> <a href=\"https:\/\/www.mysqltutorial.org\/getting-started-with-mysql\/mysql-sample-database\/\">sample database<\/a> to <code>classicmodels_backup<\/code> database.<\/p>\n\n\n\n<p><strong>Step 1<\/strong>. Create the <code>classmodels_backup<\/code> database:<\/p>\n\n\n\n<p>First, log in to the MySQL database server:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">mysql -u root -p<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Then, use <code><a href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-create-database\/\">CREATE DATABASE<\/a><\/code> statement to create a new database:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">DATABASE<\/span> classicmodels_backup;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Third, use the <a href=\"https:\/\/www.mysqltutorial.org\/mysql-administration\/mysql-show-databases\/\"><code>SHOW DATABASES<\/code><\/a> command to verify:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SHOW<\/span> <span class=\"hljs-keyword\">DATABASES<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>MySQL database server returns the following output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">+<span class=\"hljs-comment\">----------------------+<\/span>\n| Database             |\n+<span class=\"hljs-comment\">----------------------+<\/span>\n| classicmodels        |\n| classicmodels_backup |\n| information_schema   |\n| mysql                |\n| performance_schema   |\n| sys                  |\n+<span class=\"hljs-comment\">----------------------+<\/span>\n6 rows in <span class=\"hljs-keyword\">set<\/span> (<span class=\"hljs-number\">0.00<\/span> sec)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The output shows that the <code>classicmodels_backup<\/code> database has been created successfully.<\/p>\n\n\n\n<p><strong>Step 2<\/strong>. Dump the database into SQL files using the <code>mysqldump<\/code> tool.<\/p>\n\n\n\n<p>The following command dumps the <code>classicmodels<\/code> database into an SQL file located at <code>D:\\db<\/code> directory:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">mysqldump -u root -p classicmodels &gt; D:\\db\\classicmodels.sql<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This command instructs <code>mysqldump<\/code> to log in to the MySQL server using the <code>root<\/code> user account with a password and export the database objects to <code>d:\\db\\classicmodels.sql<\/code>. Note that the operator (<code>&gt;<\/code>) means exporting.<\/p>\n\n\n\n<p><strong>Step 3<\/strong>. Import the <code>d:\\db\\classicmodels.sql<\/code> file into <code>classicmodels_backup<\/code> database.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">mysql -u root -p classicmodels_backup &lt; d:\\db\\classicmodels.sql<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Note that the operator (<code>&lt;<\/code>) means importing.<\/p>\n\n\n\n<p>To verify the import, you can perform a quick check by using the <code><a href=\"https:\/\/www.mysqltutorial.org\/mysql-administration\/mysql-show-tables\/\">SHOW TABLES<\/a><\/code> command.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SHOW<\/span> <span class=\"hljs-keyword\">TABLES<\/span> <span class=\"hljs-keyword\">FROM<\/span> classicmodels_backup;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>It returned the following output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">+<span class=\"hljs-comment\">--------------------------------+<\/span>\n| Tables_in_classicmodels_backup |\n+<span class=\"hljs-comment\">--------------------------------+<\/span>\n| customers                      |\n| employees                      |\n| offices                        |\n| orderdetails                   |\n| orders                         |\n| payments                       |\n| productlines                   |\n| products                       |\n+<span class=\"hljs-comment\">--------------------------------+<\/span>\n8 rows in <span class=\"hljs-keyword\">set<\/span> (<span class=\"hljs-number\">0.01<\/span> sec)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The output indicates that we have successfully copied all the objects and data from the <code>classicmodels<\/code> database to <code>classicmodels_backup<\/code> database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Copy a MySQL database from one server to another<\/h2>\n\n\n\n<p>To copy a MySQL database from one server to another, you use the following steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, export the database on the source server to an SQL dump file using the <code>mysqldump<\/code> tool.<\/li>\n\n\n\n<li>Second, import the SQL dump file to the destination server using the <code>mysql<\/code> tool.<\/li>\n<\/ul>\n\n\n\n<p>The following picture illustrates the steps:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/12\/MySQL-copy-database-from-one-server-to-another.svg\" alt=\"MySQL copy database from one server to another\" class=\"wp-image-13515\"\/><\/figure>\n<\/div>\n\n\n<p>First, export the <code>classicmodels<\/code> database to <code>db.sql<\/code> file using the mysqldump tool:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">mysqldump -h source_server -u root -p <span class=\"hljs-comment\">--databases classicmodels &gt; d:\\db\\db.sql<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this command, you need to replace the <code>source_server<\/code> with your actual server.<\/p>\n\n\n\n<p>Note that <code>--database<\/code> option allows <code>mysqldump<\/code> to include both <code>CREATE DATABASE<\/code> and <code>USE<\/code> statements in the SQL dump file. <\/p>\n\n\n\n<p>These statements will create the <code>classicmodels<\/code> database in the destination server and make the new database the default database for loading the data.<\/p>\n\n\n\n<p>In other words, the mysqldump generates the following statements at the beginning of the SQL dump file when we use <code>--database<\/code> option:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">DATABASE<\/span> <span class=\"hljs-string\">`classicmodels`<\/span>.\n\n<span class=\"hljs-keyword\">USE<\/span> <span class=\"hljs-string\">`classicmodels`<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Second, import the <code>db.sql<\/code> file into the destination database server using the mysql tool:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">mysql -h destination_server -u root -p classicmodels &lt; c:\\tmp\\db.sql<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this command, you need to replace the <code>destination_server<\/code> with your actual server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Export a database to a dump file using the <code>mysqldump<\/code> tool and import the dump file using the <code>mysql<\/code> tool to copy a MySQL database within one server or from one server to another.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful? <\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"5621\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-administration\/mysql-copy-database\/\"\n\t\t\t\tdata-post-title=\"How To Copy a MySQL Database\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"5621\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-administration\/mysql-copy-database\/\"\n\t\t\t\tdata-post-title=\"How To Copy a MySQL Database\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows you how to copy a MySQL database on the same server and from a server to another.<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":441,"menu_order":51,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5621","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Copy a MySQL Database<\/title>\n<meta name=\"description\" content=\"This tutorial shows you how to copy a MySQL database on the same database server and from a database server to another.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Copy a MySQL Database\" \/>\n<meta property=\"og:description\" content=\"This tutorial shows you how to copy a MySQL database on the same database server and from a database server to another.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/\" \/>\n<meta property=\"og:site_name\" content=\"MySQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-27T03:41:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database-300x190.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/\",\"name\":\"How To Copy a MySQL Database\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/copy-mysql-database-300x190.jpg\",\"datePublished\":\"2017-02-09T09:01:16+00:00\",\"dateModified\":\"2023-12-27T03:41:49+00:00\",\"description\":\"This tutorial shows you how to copy a MySQL database on the same database server and from a database server to another.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/copy-mysql-database.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/copy-mysql-database.jpg\",\"width\":500,\"height\":317},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-copy-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Administration\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-administration\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To Copy a MySQL Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\",\"name\":\"MySQL Tutorial\",\"description\":\"A comprehensive MySQL Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mysqltutorial.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Copy a MySQL Database","description":"This tutorial shows you how to copy a MySQL database on the same database server and from a database server to another.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/","og_locale":"en_US","og_type":"article","og_title":"How To Copy a MySQL Database","og_description":"This tutorial shows you how to copy a MySQL database on the same database server and from a database server to another.","og_url":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/","og_site_name":"MySQL Tutorial","article_modified_time":"2023-12-27T03:41:49+00:00","og_image":[{"url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database-300x190.jpg","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/","url":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/","name":"How To Copy a MySQL Database","isPartOf":{"@id":"https:\/\/www.mysqltutorial.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/#primaryimage"},"image":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database-300x190.jpg","datePublished":"2017-02-09T09:01:16+00:00","dateModified":"2023-12-27T03:41:49+00:00","description":"This tutorial shows you how to copy a MySQL database on the same database server and from a database server to another.","breadcrumb":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mysqltutorial.org\/mysql-copy-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/#primaryimage","url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database.jpg","contentUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2017\/02\/copy-mysql-database.jpg","width":500,"height":317},{"@type":"BreadcrumbList","@id":"https:\/\/www.mysqltutorial.org\/mysql-copy-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mysqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"MySQL Administration","item":"https:\/\/www.mysqltutorial.org\/mysql-administration\/"},{"@type":"ListItem","position":3,"name":"How To Copy a MySQL Database"}]},{"@type":"WebSite","@id":"https:\/\/www.mysqltutorial.org\/#website","url":"https:\/\/www.mysqltutorial.org\/","name":"MySQL Tutorial","description":"A comprehensive MySQL Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mysqltutorial.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/5621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/comments?post=5621"}],"version-history":[{"count":5,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/5621\/revisions"}],"predecessor-version":[{"id":13521,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/5621\/revisions\/13521"}],"up":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/441"}],"wp:attachment":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/media?parent=5621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}