{"id":873,"date":"2010-05-04T16:54:19","date_gmt":"2010-05-04T16:54:19","guid":{"rendered":"http:\/\/kedar.nitty-witty.com\/?p=873"},"modified":"2018-02-14T14:30:26","modified_gmt":"2018-02-14T14:30:26","slug":"steps-to-move-copy-rename-mysql-database","status":"publish","type":"post","link":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database","title":{"rendered":"Steps to Move Copy Rename MySQL Database"},"content":{"rendered":"<p>Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation.<\/p>\n<p><strong>1. Rename database on Linux Machine:<br \/>\n<\/strong><br \/>\nA. Use RENAME DATABASE Command [MySQL 5.1].<\/p>\n<blockquote><p>RENAME DATABASE db_name TO new_db_name;<\/p><\/blockquote>\n<p>B.<\/p>\n<blockquote><p>mysql -uroot -pPASSWORD -e &#8220;drop database if exists NEW-DB-NAME; create database NEW-DB-NAME&#8221; &amp;&amp; mysqldump -uroot -pPASSWORD SOURCE-DB-NAME | mysql -uroot -pPASSWORD NEW-DB-NAME &amp;&amp; mysql -uroot -pPASSWORD -e &#8220;drop database SOURCE-DB-NAME&#8221;<\/p><\/blockquote>\n<p><strong>2. Create Duplicate of a database:<br \/>\n<\/strong><\/p>\n<blockquote><p>mysql -uroot -ppassword -e &#8220;drop database if exists DB_TO_BE_CREATED;create database DB_TO_BE_CREATED;&#8221; | mysqldump -uroot -ppassword DB_TO_BE_COPIED | mysql -uroot -ppassword DB_TO_BE_CREATED<\/p><\/blockquote>\n<p style=\"text-align: left;\"><strong>3. Copy MySQL Database to Remote MySQL Server:<\/strong><\/p>\n<p style=\"text-align: right;\">\n<p>3A. By using -h (hostname) option.<\/p>\n<p>Create MySQL Dump:<\/p>\n<blockquote><p>mysqldump -uroot -ppassword &#8211;databases DB_TO_BE_COPIED &gt; DB_TO_BE_COPIED.sql<\/p><\/blockquote>\n<p>Load MySQL Dump:<\/p>\n<blockquote><p>mysql -uroot -ppassword -hHOSTNAME &lt; DB_TO_BE_COPIED.sql OR Using Single Command: mysql -uroot -ppassword -e &#8220;drop database if exists DB_TO_BE_CREATED;create database DB_TO_BE_CREATED;&#8221; | mysqldump -uroot -ppassword DB_TO_BE_COPIED | mysql -uroot -ppassword -hHOSTNAME DB_TO_BE_CREATED 3B. By moving dump file to remote server. Create MySQL Dump: mysqldump -uroot -ppassword &#8211;databases DB_TO_BE_COPIED &gt; DB_TO_BE_COPIED.sql<\/p><\/blockquote>\n<p>Copy SQL file to remote MySQL Server:<\/p>\n<blockquote><p>scp DB_TO_BE_COPIED.sql username@remote-machin:\/path\/to\/copy<\/p><\/blockquote>\n<p>Login to remote-machin.<\/p>\n<p>Load MySQL Dump:<\/p>\n<blockquote><p>mysql -uroot -ppassword DB_TO_BE_CREATED &lt; \/path\/to\/copy\/DB_TO_BE_COPIED.sql<\/p><\/blockquote>\n<p>Here, I haven&#8217;t considered copying and moving data-files for MyISAM databases as these are just the commands-way.<\/p>\n","protected":false},"excerpt":{"rendered":"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux&hellip;\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8,377],"tags":[235,33,233,76,234],"class_list":["post-873","post","type-post","status-publish","format-standard","category-mysql","category-mysql-articles","tag-copy-mysql-databaes","tag-database","tag-move-mysql-database","tag-mysqldump","tag-rename-mysql-database"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e &quot;drop database if exists NEW-DB-NAME; create database\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kedar\"\/>\n\t<meta name=\"google-site-verification\" content=\"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA\" \/>\n\t<meta name=\"msvalidate.01\" content=\"116B62074CBCA1BA99B8CCE09CCF2FB8\" \/>\n\t<meta name=\"keywords\" content=\"copy mysql databaes,database,move mysql database,mysqldump,rename mysql database\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Change Is Inevitable | Kedar Vaijanapurkar&#039;s Blog for MySQL, technology and various subjects\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Steps to Move Copy Rename MySQL Database | Change Is Inevitable\" \/>\n\t\t<meta property=\"og:description\" content=\"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e &quot;drop database if exists NEW-DB-NAME; create database\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-05-04T16:54:19+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-02-14T14:30:26+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Steps to Move Copy Rename MySQL Database | Change Is Inevitable\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e &quot;drop database if exists NEW-DB-NAME; create database\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#article\",\"name\":\"Steps to Move Copy Rename MySQL Database | Change Is Inevitable\",\"headline\":\"Steps to Move Copy Rename MySQL Database\",\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"},\"datePublished\":\"2010-05-04T16:54:19+00:00\",\"dateModified\":\"2018-02-14T14:30:26+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#webpage\"},\"articleSection\":\"MySQL, MySQL-Articles, copy mysql databaes, Database, move mysql database, mysqldump, rename mysql database\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"position\":2,\"name\":\"MySQL\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"name\":\"MySQL-Articles\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"position\":3,\"name\":\"MySQL-Articles\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#listItem\",\"name\":\"Steps to Move Copy Rename MySQL Database\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#listItem\",\"position\":4,\"name\":\"Steps to Move Copy Rename MySQL Database\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-articles#listItem\",\"name\":\"MySQL-Articles\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#webpage\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database\",\"name\":\"Steps to Move Copy Rename MySQL Database | Change Is Inevitable\",\"description\":\"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e \\\"drop database if exists NEW-DB-NAME; create database\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/steps-to-move-copy-rename-mysql-database#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"datePublished\":\"2010-05-04T16:54:19+00:00\",\"dateModified\":\"2018-02-14T14:30:26+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/\",\"name\":\"..::CHANGE is INEVITABLE::..\",\"description\":\"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Steps to Move Copy Rename MySQL Database | Change Is Inevitable","description":"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e \"drop database if exists NEW-DB-NAME; create database","canonical_url":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database","robots":"max-image-preview:large","keywords":"copy mysql databaes,database,move mysql database,mysqldump,rename mysql database","webmasterTools":{"google-site-verification":"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA","msvalidate.01":"116B62074CBCA1BA99B8CCE09CCF2FB8","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#article","name":"Steps to Move Copy Rename MySQL Database | Change Is Inevitable","headline":"Steps to Move Copy Rename MySQL Database","author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"},"datePublished":"2010-05-04T16:54:19+00:00","dateModified":"2018-02-14T14:30:26+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#webpage"},"isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#webpage"},"articleSection":"MySQL, MySQL-Articles, copy mysql databaes, Database, move mysql database, mysqldump, rename mysql database"},{"@type":"BreadcrumbList","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/kedar.nitty-witty.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","position":2,"name":"MySQL","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","name":"MySQL-Articles"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","position":3,"name":"MySQL-Articles","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#listItem","name":"Steps to Move Copy Rename MySQL Database"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#listItem","position":4,"name":"Steps to Move Copy Rename MySQL Database","previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles#listItem","name":"MySQL-Articles"}}]},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author","url":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"WebPage","@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#webpage","url":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database","name":"Steps to Move Copy Rename MySQL Database | Change Is Inevitable","description":"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e \"drop database if exists NEW-DB-NAME; create database","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database#breadcrumblist"},"author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"creator":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"datePublished":"2010-05-04T16:54:19+00:00","dateModified":"2018-02-14T14:30:26+00:00"},{"@type":"WebSite","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website","url":"https:\/\/kedar.nitty-witty.com\/blog\/","name":"..::CHANGE is INEVITABLE::..","description":"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","inLanguage":"en-US","publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Change Is Inevitable | Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","og:type":"article","og:title":"Steps to Move Copy Rename MySQL Database | Change Is Inevitable","og:description":"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e &quot;drop database if exists NEW-DB-NAME; create database","og:url":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database","article:published_time":"2010-05-04T16:54:19+00:00","article:modified_time":"2018-02-14T14:30:26+00:00","twitter:card":"summary","twitter:title":"Steps to Move Copy Rename MySQL Database | Change Is Inevitable","twitter:description":"Moving, copying or renaming database is a very basic activity. I have just noted a few commands for reference to quickly follow the required operation. 1. Rename database on Linux Machine: A. Use RENAME DATABASE Command [MySQL 5.1]. RENAME DATABASE db_name TO new_db_name; B. mysql -uroot -pPASSWORD -e &quot;drop database if exists NEW-DB-NAME; create database"},"aioseo_meta_data":{"post_id":"873","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-24 17:46:06","updated":"2025-08-16 19:06:59","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\" title=\"MySQL\">MySQL<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles\" title=\"MySQL-Articles\">MySQL-Articles<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSteps to Move Copy Rename MySQL Database\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/kedar.nitty-witty.com\/blog"},{"label":"MySQL","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql"},{"label":"MySQL-Articles","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-articles"},{"label":"Steps to Move Copy Rename MySQL Database","link":"https:\/\/kedar.nitty-witty.com\/blog\/steps-to-move-copy-rename-mysql-database"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/comments?post=873"}],"version-history":[{"count":2,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/873\/revisions"}],"predecessor-version":[{"id":2458,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/873\/revisions\/2458"}],"wp:attachment":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/media?parent=873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/categories?post=873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/tags?post=873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}