{"id":48715,"date":"2021-03-18T11:21:38","date_gmt":"2021-03-18T11:21:38","guid":{"rendered":"https:\/\/www.awardspace.com\/?p=48715"},"modified":"2024-02-28T12:05:20","modified_gmt":"2024-02-28T12:05:20","slug":"import-database-ssh","status":"publish","type":"post","link":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/","title":{"rendered":"How can I import a database using SSH?"},"content":{"rendered":"<p>You need to create an SSH account from your <strong>Control Panel &gt; Hosting Tools &gt; SSH Manager section<\/strong>.<\/p>\n<p>Your database backup\/dump can be imported using your configured SSH account by executing the following command through SSH:<\/p>\n<p>mysql -h [DB HOSTNAME] -u [DB USERNAME] -p[DB PASSWORD] [DB NAME] &lt; \/home\/www\/database.sql<\/p>\n<p>All the database settings &#8211; [DB HOST], [DB USER], [DB PASS], and [DB NAME] should be written exactly as they are displayed in your Hosting Control Panel &gt; Database Manager section.<\/p>\n<p>The dump file should be uploaded into your hosting account and the path \/home\/www\/database.sql may vary depending on the place you uploaded the dump of your database. For example, if you have uploaded your MySQL dump file at \/home\/www\/yourdomain.ext\/backups\/database.sql you should edit the command to look like this:<\/p>\n<p>MySQL -h [DB HOSTNAME] -u [DB USERNAME] -p[DB PASSWORD] [DB NAME] &lt; \/home\/www\/yourdomain.ext\/backups\/database.sql<\/p>\n<p>Note: You should make some slight modifications to your database.sql file prior to the import. You need to remove the CREATE DATABASE and USE commands at the first lines of your database.sql file. The lines in question are shown below:<\/p>\n<p>\u2212\u2212 CREATE DATABASE \u2018username_db\u2019 DEFAULT CHARACTER SET XXXX COLLATE XXXX;<\/p>\n<p>\u2212\u2212 USE username_db;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You need to create an SSH account from your Control Panel &gt; Hosting Tools &gt; SSH Manager section. Your database backup\/dump can be imported using your configured SSH account by executing the following command through SSH: mysql -h [DB HOSTNAME] -u [DB USERNAME] -p[DB PASSWORD] [DB NAME] &lt; \/home\/www\/database.sql All the database settings &#8211; [DB [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":33819,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[56],"tags":[],"class_list":["post-48715","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-management"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How can I import a database using SSH? - AwardSpace.com<\/title>\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.awardspace.com\/kb\/import-database-ssh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How can I import a database using SSH? - AwardSpace.com\" \/>\n<meta property=\"og:description\" content=\"You need to create an SSH account from your Control Panel &gt; Hosting Tools &gt; SSH Manager section. Your database backup\/dump can be imported using your configured SSH account by executing the following command through SSH: mysql -h [DB HOSTNAME] -u [DB USERNAME] -p[DB PASSWORD] [DB NAME] &lt; \/home\/www\/database.sql All the database settings &#8211; [DB [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/\" \/>\n<meta property=\"og:site_name\" content=\"AwardSpace.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AwardSpace\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-18T11:21:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-28T12:05:20+00:00\" \/>\n<meta name=\"author\" content=\"Lazar Shishmanov, PhD\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@awspace\" \/>\n<meta name=\"twitter:site\" content=\"@awspace\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lazar Shishmanov, PhD\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/\"},\"author\":{\"name\":\"Lazar Shishmanov, PhD\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b\"},\"headline\":\"How can I import a database using SSH?\",\"datePublished\":\"2021-03-18T11:21:38+00:00\",\"dateModified\":\"2024-02-28T12:05:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/\"},\"wordCount\":225,\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Database Management\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/\",\"url\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/\",\"name\":\"How can I import a database using SSH? - AwardSpace.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2021-03-18T11:21:38+00:00\",\"dateModified\":\"2024-02-28T12:05:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.awardspace.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\/\/www.awardspace.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"F.A.Q.\",\"item\":\"https:\/\/www.awardspace.com\/kb\/f-a-q\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Database Management\",\"item\":\"https:\/\/www.awardspace.com\/kb\/f-a-q\/database-management\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"How can I import a database using SSH?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.awardspace.com\/#website\",\"url\":\"https:\/\/www.awardspace.com\/\",\"name\":\"AwardSpace.com\",\"description\":\"Free Web Hosting with PHP, MySQL, Email Sending, No Ads\",\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.awardspace.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.awardspace.com\/#organization\",\"name\":\"AwardSpace.com\",\"url\":\"https:\/\/www.awardspace.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"contentUrl\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"width\":1759,\"height\":176,\"caption\":\"AwardSpace.com\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/AwardSpace\/\",\"https:\/\/x.com\/awspace\",\"https:\/\/www.instagram.com\/awardspace\/\",\"https:\/\/www.quora.com\/profile\/Award-Space\",\"https:\/\/www.linkedin.com\/company\/19214384\/\",\"https:\/\/www.reddit.com\/user\/AwardSpace\",\"https:\/\/www.pinterest.com\/awardspace\/\",\"https:\/\/www.youtube.com\/user\/AwardspaceWebHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b\",\"name\":\"Lazar Shishmanov, PhD\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g\",\"caption\":\"Lazar Shishmanov, PhD\"},\"description\":\"Lazar is a marketing specialist with more than ten years of experience in the field, eight of which as part of the marketing department at AwardSpace. Academically, Lazar holds a Bachelor's degree in Public Relations, a Master's degree in Semiotics, Language and Advertising, and is a PhD candidate in Integrated Marketing Communications. You can learn more about Lazar on his personal website.\",\"url\":\"https:\/\/www.awardspace.com\/author\/lazar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How can I import a database using SSH? - AwardSpace.com","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.awardspace.com\/kb\/import-database-ssh\/","og_locale":"en_US","og_type":"article","og_title":"How can I import a database using SSH? - AwardSpace.com","og_description":"You need to create an SSH account from your Control Panel &gt; Hosting Tools &gt; SSH Manager section. Your database backup\/dump can be imported using your configured SSH account by executing the following command through SSH: mysql -h [DB HOSTNAME] -u [DB USERNAME] -p[DB PASSWORD] [DB NAME] &lt; \/home\/www\/database.sql All the database settings &#8211; [DB [&hellip;]","og_url":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/","og_site_name":"AwardSpace.com","article_publisher":"https:\/\/www.facebook.com\/AwardSpace\/","article_published_time":"2021-03-18T11:21:38+00:00","article_modified_time":"2024-02-28T12:05:20+00:00","author":"Lazar Shishmanov, PhD","twitter_card":"summary_large_image","twitter_creator":"@awspace","twitter_site":"@awspace","twitter_misc":{"Written by":"Lazar Shishmanov, PhD","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#article","isPartOf":{"@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/"},"author":{"name":"Lazar Shishmanov, PhD","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b"},"headline":"How can I import a database using SSH?","datePublished":"2021-03-18T11:21:38+00:00","dateModified":"2024-02-28T12:05:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/"},"wordCount":225,"publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"image":{"@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage"},"thumbnailUrl":"","articleSection":["Database Management"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/","url":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/","name":"How can I import a database using SSH? - AwardSpace.com","isPartOf":{"@id":"https:\/\/www.awardspace.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage"},"image":{"@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage"},"thumbnailUrl":"","datePublished":"2021-03-18T11:21:38+00:00","dateModified":"2024-02-28T12:05:20+00:00","breadcrumb":{"@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.awardspace.com\/kb\/import-database-ssh\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.awardspace.com\/kb\/import-database-ssh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.awardspace.com\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/www.awardspace.com\/kb\/"},{"@type":"ListItem","position":3,"name":"F.A.Q.","item":"https:\/\/www.awardspace.com\/kb\/f-a-q\/"},{"@type":"ListItem","position":4,"name":"Database Management","item":"https:\/\/www.awardspace.com\/kb\/f-a-q\/database-management\/"},{"@type":"ListItem","position":5,"name":"How can I import a database using SSH?"}]},{"@type":"WebSite","@id":"https:\/\/www.awardspace.com\/#website","url":"https:\/\/www.awardspace.com\/","name":"AwardSpace.com","description":"Free Web Hosting with PHP, MySQL, Email Sending, No Ads","publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.awardspace.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.awardspace.com\/#organization","name":"AwardSpace.com","url":"https:\/\/www.awardspace.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","contentUrl":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","width":1759,"height":176,"caption":"AwardSpace.com"},"image":{"@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/AwardSpace\/","https:\/\/x.com\/awspace","https:\/\/www.instagram.com\/awardspace\/","https:\/\/www.quora.com\/profile\/Award-Space","https:\/\/www.linkedin.com\/company\/19214384\/","https:\/\/www.reddit.com\/user\/AwardSpace","https:\/\/www.pinterest.com\/awardspace\/","https:\/\/www.youtube.com\/user\/AwardspaceWebHosting"]},{"@type":"Person","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b","name":"Lazar Shishmanov, PhD","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g","caption":"Lazar Shishmanov, PhD"},"description":"Lazar is a marketing specialist with more than ten years of experience in the field, eight of which as part of the marketing department at AwardSpace. Academically, Lazar holds a Bachelor's degree in Public Relations, a Master's degree in Semiotics, Language and Advertising, and is a PhD candidate in Integrated Marketing Communications. You can learn more about Lazar on his personal website.","url":"https:\/\/www.awardspace.com\/author\/lazar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/48715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/comments?post=48715"}],"version-history":[{"count":0,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/48715\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/media?parent=48715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/categories?post=48715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/tags?post=48715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}