{"id":1857,"date":"2019-10-03T15:38:50","date_gmt":"2019-10-03T07:38:50","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&#038;p=1857"},"modified":"2022-10-07T07:51:49","modified_gmt":"2022-10-06T23:51:49","slug":"database-using-mysqldump","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/database-using-mysqldump","title":{"rendered":"Database using Mysqldump"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1857\" class=\"elementor elementor-1857\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4ce8e4e3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4ce8e4e3\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-49e38d00\" data-id=\"49e38d00\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5cbd85c elementor-widget elementor-widget-heading\" data-id=\"5cbd85c\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Database using MySQLdump<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7dcaf123 elementor-widget elementor-widget-text-editor\" data-id=\"7dcaf123\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p dir=\"ltr\">Below are mysqldump commands for backup and restore mysql database:<\/p><h5 dir=\"ltr\"><b>WINDOWS<\/b><b>:<\/b><\/h5><p><b>Backup:<\/b><br \/>C:\\mysql\\bin&gt; mysqldump -u username -p password\u00a0database &gt; dumbfile.sql<\/p><p><b>Restore:<\/b><br \/>C:\\mysql\\bin&gt;mysql -u username -p password\u00a0database &lt; dumpfile.sql<\/p><hr \/><h5 dir=\"ltr\"><b>UNIX \/ LINUX<\/b><\/h5><p dir=\"ltr\"><strong>Method A<\/strong> (followed by the user database username and password)<br \/>=======<b><br \/>Backup:<\/b><br \/>mysqldump -u username -p password database &gt; dumbfile.sql<\/p><p><b>Restore:<\/b><br \/>mysql -u username -p password database &lt; dumbfile.sql<\/p><p><strong>Method B<\/strong> (backup and restore with root access)<br \/>========<br \/><b>Backup:<br \/><\/b>mysqldump databasename &gt; dumpfile.sql<b><\/b><\/p><p><strong>Restore:<\/strong><br \/>mysql newdatabasename &lt; dumpfile.sql<\/p><p><b><\/b><b>Notes:<\/b><br \/>&#8211; dumbfile.sql contains SQL command for creating tables and data. (CREATE,INSERT,DROP etc.) <a href=\"https:\/\/mysqlserverteam.com\/creating-and-restoring-database-backups-with-mysqldump-and-mysql-enterprise-backup-part-1-of-2\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"broken_link\">Learn more<\/a><\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Database using MySQLdump Below are mysqldump commands for backup and restore mysql database: WINDOWS: Backup:C:mysqlbin&gt; mysqldump -u username -p password\u00a0database &gt; dumbfile.sql Restore:C:mysqlbin&gt;mysql -u username -p password\u00a0database &lt; dumpfile.sql UNIX \/ LINUX Method A (followed by the user database username and password)=======Backup:mysqldump -u username -p password database &gt; dumbfile.sql Restore:mysql -u username -p password database &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.mondoze.com\/guide\/kb\/database-using-mysqldump\"> <span class=\"screen-reader-text\">Database using Mysqldump<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[123],"kbtag":[110],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/1857"}],"collection":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/comments?post=1857"}],"version-history":[{"count":6,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/1857\/revisions"}],"predecessor-version":[{"id":18569,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/1857\/revisions\/18569"}],"wp:attachment":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/media?parent=1857"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=1857"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtag?post=1857"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=1857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}