{"id":393,"date":"2014-07-17T21:03:02","date_gmt":"2014-07-17T21:03:02","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=393"},"modified":"2014-07-17T21:03:02","modified_gmt":"2014-07-17T21:03:02","slug":"exportimport-mysql-database","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/17\/exportimport-mysql-database\/","title":{"rendered":"Export\/Import Mysql Database"},"content":{"rendered":"<p>Export a database mysql<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mysqldump -u -p username database_name &gt; dbname.sql\n\n<\/pre>\n<p>Plesk Server<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mysqldump  -u admin -p`cat \/etc\/psa\/.psa.shadow` wordpress_database &gt; domain_backup_7.16.14.sql\n\n<\/pre>\n<p>To export a single table from your database you would use the following command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mysqldump -p --user=username database_name tableName &gt; tableName.sql\n\n<\/pre>\n<p>Import a database or table<\/p>\n<p># mysql -p -u username database_name < file.sql \n\n[\/bash]\n\nFor Plesk server\n[bash]\n\n# mysql -u admin -p`cat \/etc\/psa\/.psa.shadow` database < \/tmp\/database.sql\n[\/bash]\n\n\n\nTo import a single table into an existing database you would use the following command:\n[bash]\n\n#mysql -u username -p -D database_name < tableName.sql\n\n[\/bash]\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Export a database mysql # mysqldump -u -p username database_name &gt; dbname.sql Plesk Server # mysqldump -u admin -p`cat \/etc\/psa\/.psa.shadow` wordpress_database &gt; domain_backup_7.16.14.sql To export a single table from your database you would use the following command: # mysqldump -p &#8211;user=username database_name tableName &gt; tableName.sql Import a database or table # mysql -p -u username &#8230; <a title=\"Export\/Import Mysql Database\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/17\/exportimport-mysql-database\/\" aria-label=\"Read more about Export\/Import Mysql Database\">Read more<\/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,70],"tags":[],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-administration","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}