{"id":5886,"date":"2016-08-22T13:14:30","date_gmt":"2016-08-22T13:14:30","guid":{"rendered":"https:\/\/bodhost.com\/kb\/?p=5886"},"modified":"2026-02-26T14:03:11","modified_gmt":"2026-02-26T14:03:11","slug":"mysql-backup-with-mysqldump-in-linux","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/","title":{"rendered":"How to Save a MySQL Database Quickly with MySQLDump in Linux?"},"content":{"rendered":"\r\n<h3 class=\"wp-block-heading\"><strong>Summary:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">In a previous tutorial, we have seen how to save a MySQL Database with MySQLDump in Windows (WAMP). Today, we will see the quickest way to save a MySQL Database in Linux. For information databases. The backup also be done through a script that allows saving a database or set of databases.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">But the script can be a little too complex for easy to use tool for backup, natively available in MySQL. So here, we are going to see how to save a MySQL database by using the Linux command line.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">So we will use the command line for mysqldump. That can save a database to store it in a .sql file. That can be back later as well. In short, the SQL file will contain a set of commands. When it will be read by MySQL and will present the data to its original state (when it was backed up).<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">MySQLDump directly included in the installation of a MySQL Server. Suppose I want to save the database \u201cbod007&#8243; \ud83d\ude42\u00a0in the file \u201cbod007_nil84aug.sql\u201d, I will use the following command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">mysqldump -u root -p --single-transaction --add-drop-database --databases bod007&gt; bod007_nil84aug.sql<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">We, therefore, use the option \u201c-databases\u201d that add the \u201cCREATE DATABASE\u201d and \u201cUSE dbname\u201d, allowing us to return the database more easily. We also used \u201c-add-drop-databases\u201d that adds \u201cDROP DATABASE IF EXISTS\u201d in the portion of the command \u201cmysqldump\u201d. This also allows easy relocation of a database by deleting the database restore to the server (if any) to be replaced by saved.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Finally, it specifies the name of the database to back up. Then redirects all to the file .sql wanted with the \u201c&gt;\u201d, used to write the output of a command in a Linux file.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Summary: In a previous tutorial, we have seen how to save a MySQL Database with MySQLDump in Windows (WAMP). Today, we will see the quickest way to save a MySQL&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[297],"tags":[790,791,786,792],"class_list":["post-5886","post","type-post","status-publish","format-standard","hentry","category-faq","tag-mysql-backup","tag-mysql-backup-with-mysqldump","tag-mysqldump","tag-mysqldump-backup-database"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Save a MySQL Database Quickly with MySQLDump in Linux?<\/title>\n<meta name=\"description\" content=\"Learn how to use MySQLDump in Linux to quickly and easily save a MySQL database. Keep your data safe and secure with these simple steps.\" \/>\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.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Save a MySQL Database Quickly with MySQLDump in Linux?\" \/>\n<meta property=\"og:description\" content=\"Learn how to use MySQLDump in Linux to quickly and easily save a MySQL database. Keep your data safe and secure with these simple steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-22T13:14:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:03:11+00:00\" \/>\n<meta name=\"author\" content=\"Stanley Poter\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stanley Poter\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/\"},\"author\":{\"name\":\"Stanley Poter\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/09d74a6c8cc87831c7722d3c5006a7b2\"},\"headline\":\"How to Save a MySQL Database Quickly with MySQLDump in Linux?\",\"datePublished\":\"2016-08-22T13:14:30+00:00\",\"dateModified\":\"2026-02-26T14:03:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/\"},\"wordCount\":290,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"mysql backup\",\"mysql backup with mysqldump\",\"MySQLDump\",\"mysqldump backup database\"],\"articleSection\":[\"FAQs\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/\",\"name\":\"How to Save a MySQL Database Quickly with MySQLDump in Linux?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2016-08-22T13:14:30+00:00\",\"dateModified\":\"2026-02-26T14:03:11+00:00\",\"description\":\"Learn how to use MySQLDump in Linux to quickly and easily save a MySQL database. Keep your data safe and secure with these simple steps.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/mysql-backup-with-mysqldump-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"FAQs\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/faq\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Save a MySQL Database Quickly with MySQLDump in Linux?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/09d74a6c8cc87831c7722d3c5006a7b2\",\"name\":\"Stanley Poter\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/054b9fa5e2ef6d163cd09392387bc6d5e3b785360d8f7b3625791850670fc434?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/054b9fa5e2ef6d163cd09392387bc6d5e3b785360d8f7b3625791850670fc434?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/054b9fa5e2ef6d163cd09392387bc6d5e3b785360d8f7b3625791850670fc434?s=96&d=mm&r=g\",\"caption\":\"Stanley Poter\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/stanleypoter\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Save a MySQL Database Quickly with MySQLDump in Linux?","description":"Learn how to use MySQLDump in Linux to quickly and easily save a MySQL database. Keep your data safe and secure with these simple steps.","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.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Save a MySQL Database Quickly with MySQLDump in Linux?","og_description":"Learn how to use MySQLDump in Linux to quickly and easily save a MySQL database. Keep your data safe and secure with these simple steps.","og_url":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2016-08-22T13:14:30+00:00","article_modified_time":"2026-02-26T14:03:11+00:00","author":"Stanley Poter","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stanley Poter","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/"},"author":{"name":"Stanley Poter","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/09d74a6c8cc87831c7722d3c5006a7b2"},"headline":"How to Save a MySQL Database Quickly with MySQLDump in Linux?","datePublished":"2016-08-22T13:14:30+00:00","dateModified":"2026-02-26T14:03:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/"},"wordCount":290,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["mysql backup","mysql backup with mysqldump","MySQLDump","mysqldump backup database"],"articleSection":["FAQs"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/","url":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/","name":"How to Save a MySQL Database Quickly with MySQLDump in Linux?","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2016-08-22T13:14:30+00:00","dateModified":"2026-02-26T14:03:11+00:00","description":"Learn how to use MySQLDump in Linux to quickly and easily save a MySQL database. Keep your data safe and secure with these simple steps.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/mysql-backup-with-mysqldump-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"FAQs","item":"https:\/\/www.bodhost.com\/kb\/category\/faq\/"},{"@type":"ListItem","position":2,"name":"How to Save a MySQL Database Quickly with MySQLDump in Linux?"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/09d74a6c8cc87831c7722d3c5006a7b2","name":"Stanley Poter","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/054b9fa5e2ef6d163cd09392387bc6d5e3b785360d8f7b3625791850670fc434?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/054b9fa5e2ef6d163cd09392387bc6d5e3b785360d8f7b3625791850670fc434?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054b9fa5e2ef6d163cd09392387bc6d5e3b785360d8f7b3625791850670fc434?s=96&d=mm&r=g","caption":"Stanley Poter"},"url":"https:\/\/www.bodhost.com\/kb\/author\/stanleypoter\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/5886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=5886"}],"version-history":[{"count":12,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/5886\/revisions"}],"predecessor-version":[{"id":12050,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/5886\/revisions\/12050"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=5886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=5886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=5886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}