{"id":26088,"date":"2020-12-07T13:35:09","date_gmt":"2020-12-07T04:35:09","guid":{"rendered":"https:\/\/tadtadya.com\/en\/?p=26088"},"modified":"2021-01-25T14:50:37","modified_gmt":"2021-01-25T05:50:37","slug":"mysql-mariadb-how-to-backup-2","status":"publish","type":"post","link":"https:\/\/tadtadya.com\/en\/mysql-mariadb-how-to-backup-2\/","title":{"rendered":"MySQL\/MariaDB, How to backup"},"content":{"rendered":"\n<p>The method of backing up MySQL is simple, just run the 'mysqldump' command.<\/p>\n\n\n\n<p>It's the same with MariaDB.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-origin-block-msg-box\"><div class=\"msgbox msgbox-notice v1\"><i class=\"fas fa-exclamation-triangle icon\"><\/i><div class=\"msg\">\n<p>This is written by a Japanese who can't speak English with the help of translation application. Sorry if it's not good.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<p>Run the following command<\/p>\n\n\n\n<div class=\"wp-block-origin-block-em-box em-group em-group-format block\">\n<div class=\"pre-code-title\"><\/div><pre class=\"\" data-user=\"root\" data-output=\"\"><code class=\"language-bash\">mysqldump -uuser -ppassword db_name > backup.sql<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td>user<\/td><td>DB Connection User<\/td><\/tr><tr><td>password<\/td><td>DB connection password<\/td><\/tr><tr><td>db_name<\/td><td>Database Name<\/td><\/tr><tr><td>backup.sql<\/td><td>Backup File Name<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n\n\n\n<h2 class=\"is-style-h2df\">Options<\/h2>\n\n\n\n<h3 class=\"is-style-h3df\">-u<\/h3>\n\n\n\n<p>Database connection user name<\/p>\n\n\n\n<h3 class=\"is-style-h3df\">-p<\/h3>\n\n\n\n<p>Database connection password<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-dots\"\/>\n\n\n\n<hr class=\"wp-block-separator is-style-dots\"\/>\n\n\n\n<p>Redirect the 'mysqldump' command and write the backup contents to the backup.sql file.<\/p>\n\n\n\n<p>Use this backup.sql to restore the database.<\/p>\n\n\n\n<div class=\"wp-block-origin-block-em-box em-group em-group-link em-group-related\">\n<div class=\"wp-block-origin-block-blog-card blog-card\"><div class=\"img\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/tadtadya.com\/en\/wp-content\/uploads\/sites\/2\/2020\/12\/mysql-marriadb-logo-en.png?ssl=1\" alt=\"MySQL\/MariaDB logo\" data-recalc-dims=\"1\"\/><\/div><div class=\"text\"><h2 class=\"title\">MySQL\/MariaDB, How to Restore<\/h2><div class=\"content\"><\/div><small class=\"host\">tadtadya.com\/en<\/small><\/div><a href=\"https:\/\/tadtadya.com\/en\/mysql-mariadb-how-to-restore-2\/\" title=\"MySQL\/MariaDB, How to Restore\"><\/a><\/div>\n<\/div>\n\n<!-- WP QUADS Content Ad Plugin v. 2.0.65.1 -->\n<div class=\"quads-location quads-ad2\" id=\"quads-ad2\" style=\"float:none;margin:0px;\">\n<ul class=\"quads-location-ul\">\r\n<li class=\"quads-location-li li-1\">\r\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-4926008942376207\"\r\n     data-ad-slot=\"6550760310\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\r\n<\/li>\r\n<li class=\"quads-location-li li-2\">\r\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-4926008942376207\"\r\n     data-ad-slot=\"6550760310\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\r\n<\/li>\r\n<\/ul>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>The method of backing up MySQL is simple, just run the 'mysqldump' command. It's the same with MariaDB.<\/p>\n","protected":false},"author":1,"featured_media":26093,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"You should look at the official documentation. But there is a way to backup MySQL.\n\nSame with MariaDB.\n\n#MySQL\n#MariaDB\n","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_options":[]},"categories":[9,389,390],"tags":[548,549,550],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/tadtadya.com\/en\/wp-content\/uploads\/sites\/2\/2020\/12\/mysql-marriadb-logo-en.png?fit=1280%2C671&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8Qw77-6MM","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/posts\/26088"}],"collection":[{"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/comments?post=26088"}],"version-history":[{"count":0,"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/posts\/26088\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/media\/26093"}],"wp:attachment":[{"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/media?parent=26088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/categories?post=26088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tadtadya.com\/en\/wp-json\/wp\/v2\/tags?post=26088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}