{"id":801,"date":"2024-04-23T11:40:38","date_gmt":"2024-04-23T11:40:38","guid":{"rendered":"https:\/\/linuxresellerwebhosting.in\/blog\/?p=801"},"modified":"2024-04-23T11:40:38","modified_gmt":"2024-04-23T11:40:38","slug":"how-to-import-a-mysql-database","status":"publish","type":"post","link":"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-import-a-mysql-database\/","title":{"rendered":"How to Import a MySQL Database using phpMyAdmin"},"content":{"rendered":"<p>Importing a MySQL database using phpMyAdmin is a straightforward process that allows you to transfer data from one database to another or restore a backup. If you planning to share a locally developed database from your web server? Maybe you\u2019re migrating a database for WordPress\u00a0or another content management system (CMS) for development purposes. Whatever the case, phpMyAdmin has a simple process for importing a database file after\u00a0creating the database\u00a0in cPanel.<\/p>\n<p>In this tutorial, we will show you how to\u00a0<strong>import a MySQL Database using phpMyAdmin in cPanel<\/strong>.<\/p>\n<h2 id=\"how-to\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Import_MySQL_Database\"><\/span>Import MySQL Database<span class=\"ez-toc-section-end\"><\/span><\/h2><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-import-a-mysql-database\/#Import_MySQL_Database\" >Import MySQL Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-import-a-mysql-database\/#Troubleshooting\" >Troubleshooting<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-import-a-mysql-database\/#1044_%E2%80%93_Access_denied\" >#1044 \u2013 Access denied<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-import-a-mysql-database\/#50_MB_databases\" >50+ MB databases<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-import-a-mysql-database\/#Shared_Servers\" >Shared Servers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxresellerwebhosting.in\/blog\/how-to-import-a-mysql-database\/#VPS_Dedicated_Servers\" >VPS \/ Dedicated Servers<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n<div class=\"flex-1 overflow-hidden\">\n<div class=\"react-scroll-to-bottom--css-mjsoe-79elbk h-full\">\n<div class=\"react-scroll-to-bottom--css-mjsoe-1n7m0yu\">\n<div class=\"flex flex-col text-sm pb-9\">\n<div class=\"w-full text-token-text-primary\" dir=\"auto\" data-testid=\"conversation-turn-5\">\n<div class=\"px-4 py-2 justify-center text-base md:gap-6 m-auto\">\n<div class=\"flex flex-1 text-base mx-auto gap-3 juice:gap-4 juice:md:gap-6 md:px-5 lg:px-1 xl:px-5 md:max-w-3xl lg:max-w-[40rem] xl:max-w-[48rem]\">\n<div class=\"relative flex w-full flex-col agent-turn\">\n<div class=\"flex-col gap-1 md:gap-3\">\n<div class=\"flex flex-grow flex-col max-w-full\">\n<div class=\"min-h-[20px] text-message flex flex-col items-start gap-3 whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 overflow-x-auto\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"c302fc54-3ec2-416b-89f5-69f7c6de4203\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<p>Importing a database via phpMyAdmin involves a few simple steps. Here\u2019s a detailed guide:<\/p>\n<ol class=\"article_list\">\n<li>Log into cPanel.<\/li>\n<li>Under\u00a0<i>Databases<\/i>, open phpMyAdmin by clicking the\u00a0<b>phpMyAdmin<\/b>\u00a0icon.<\/li>\n<li>On the left, select the database that you will be working with.<\/li>\n<li>Click\u00a0<b>Import<\/b>\u00a0in the top menu.<\/li>\n<li>Under\u00a0<b>File to Import<\/b>, click\u00a0<b>Browse<\/b>\u00a0and select the backup file you previously created (it will either be a .sql .zip or .tar.gz file).<\/li>\n<li>Click\u00a0<b>Go<\/b>\u00a0at the bottom right to import the database file.<\/li>\n<li>When the database has been imported successfully, you should see a message at the top of the page similar to:\u00a0<i>Import has been successfully finished, ## queries executed.<\/i><\/li>\n<\/ol>\n<p>That&#8217;s it! You&#8217;ve successfully imported a MySQL database using phpMyAdmin. If you encounter any issues during the process, double-check your settings and consult any error messages for troubleshooting assistance.<\/p>\n<h2 id=\"troubleshooting\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting\"><\/span>Troubleshooting<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1044_%E2%80%93_Access_denied\"><\/span>#1044 \u2013 Access denied<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If you get the following error when importing a database via PhpMyAdmin, you will need to edit the SQL file you\u2019re trying to import. PhpMyAdmin does not allow you to CREATE databases due to security reasons. In order to get your SQL file to load you will need to remove the CREATE SCHEMA line at the beginning of your code.<\/p>\n<h3 id=\"50mb\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"50_MB_databases\"><\/span>50+ MB databases<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<div class=\"entry-content\">\n<p>The process for uploading databases over 50 MB differs depending on your <a href=\"https:\/\/linuxresellerwebhosting.in\/\">Hosting plan<\/a>.<\/p>\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Shared_Servers\"><\/span>Shared Servers<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>For databases over 50 MB, you can simply\u00a0import the database via SSH. Alternatively, you can\u00a0install a phpMyAdmin instance\u00a0to import it to your server.<\/p>\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"VPS_Dedicated_Servers\"><\/span>VPS \/ Dedicated Servers<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>VPS and <a href=\"https:\/\/www.squarebrothers.com\/dedicated-server-india\/\" target=\"_blank\" rel=\"noopener\">Dedicated server<\/a> users with\u00a0root access\u00a0can increase the\u00a0<i>max upload size<\/i> as needed in WebHost Manager (WHM) Tweak Settings section.<\/p>\n<\/div>\n<div class=\"row articles\">\n<div class=\"col-md-12\">\n<p>Advanced users with\u00a0root access\u00a0can import a database larger than 50 MB by\u00a0logging into MySQL in SSH.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Importing a MySQL database using phpMyAdmin is a straightforward process that allows you to transfer data from one database to<\/p>\n","protected":false},"author":1,"featured_media":806,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[33,2],"tags":[],"class_list":["post-801","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-linux"],"_links":{"self":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=801"}],"version-history":[{"count":4,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/801\/revisions"}],"predecessor-version":[{"id":805,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/801\/revisions\/805"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/media\/806"}],"wp:attachment":[{"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxresellerwebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}