{"id":71,"date":"2015-08-27T08:52:36","date_gmt":"2015-08-27T07:52:36","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=71"},"modified":"2015-08-27T08:52:36","modified_gmt":"2015-08-27T07:52:36","slug":"dumping-a-database-export-to-file-in-linux","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2015\/08\/27\/dumping-a-database-export-to-file-in-linux\/","title":{"rendered":"Dumping a database export to file in Linux"},"content":{"rendered":"<p><strong>Backing up MySQL databases<\/strong> is easy. You can do this database export in linux with the mysqldump command line as follows;<\/p>\n<pre><strong>mybox:<\/strong> # mysqldump -u root -p databasesource &gt; mydatabase-backup-27-aug-2015.sql<\/pre>\n<p>(where databasesource is the database you want to export)<\/p>\n<p>Of course, after you have dumped the SQL database you want to export you may need to import it back into the machine or a new server that you are migrating to. This is also easy to do;<\/p>\n<pre><strong>mybox:<\/strong> #mysql -u root -p databasetarget &lt; mydatabase-backup-27-aug-2015.sql<\/pre>\n<p>(where databasetarget is the database you wish to import to)<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Backing up MySQL databases is easy. You can do this database export in linux with the mysqldump command line as follows; mybox: # mysqldump -u root -p databasesource &gt; mydatabase-backup-27-aug-2015.sql (where databasesource is the database you want to export) Of &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2015\/08\/27\/dumping-a-database-export-to-file-in-linux\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":0,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}