{"id":52,"date":"2010-06-17T21:10:00","date_gmt":"2010-06-17T21:10:00","guid":{"rendered":"http:\/\/www.codeboss.in\/web-funda\/?p=52"},"modified":"2010-06-17T21:10:00","modified_gmt":"2010-06-17T21:10:00","slug":"import-large-database-in-mysql","status":"publish","type":"post","link":"https:\/\/codeboss.in\/web-funda\/2010\/06\/17\/import-large-database-in-mysql\/","title":{"rendered":"Import large database in MySQL"},"content":{"rendered":"<p>We generally use <a href=\"http:\/\/www.phpmyadmin.net\" target=\"_blank\" rel=\"noopener\">phpMyAdmin<\/a> for importing database \/ tables from mySQL dump files. But when the file is large (can be 50 MB or even 700 MB) it is not possible to import it via a web interface. We can import such large files from the command prompt.<\/p>\n<p>1. Open the Command prompt. <\/p>\n<p>2. Go to folder where MySQL is installed. If you are running WAMP the path can be like D:\\wamp\\bin\\mysql\\mysql5.0.51b\\bin (I do not install my WAMP in the drive where my OS is, hence D: \ud83d\ude42 )<\/p>\n<p>3. Login to MySQL by typing <br \/><b>mysql -u [username] -p<\/b><br \/>You will be prompted to enter the password in the next line. Type it and press Enter.<br \/>If you are working on local generally you wont need a password and can hence type<br \/><b>mysql -u root<\/b><\/p>\n<p>4. From the MySQL prompt to select the database type<br \/><b>use [database_name]<\/b><\/p>\n<p>5. Now to import the file type<br \/><b>source [file_name_with_full_path]<\/b><br \/>Like if the file is in drive F and is named test.sql, you need to type<br \/><b>source F:\\test.sql<br \/><\/b><\/p>\n<p>That would import the file. Hope you find the post useful. Njoy \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We generally use phpMyAdmin for importing database \/ tables from mySQL dump files. But when the file is large (can be 50 MB or even 700 MB) it is not possible to import it via a web interface. We can import such large files from the command prompt. 1. Open the Command prompt. 2. Go&hellip; <a class=\"more-link\" href=\"https:\/\/codeboss.in\/web-funda\/2010\/06\/17\/import-large-database-in-mysql\/\">Continue reading <span class=\"screen-reader-text\">Import large database in MySQL<\/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":[1],"tags":[56],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-mysql","entry"],"_links":{"self":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":0,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"wp:attachment":[{"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeboss.in\/web-funda\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}