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 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: 🙂 )
3. Login to MySQL by typing
mysql -u [username] -p
You will be prompted to enter the password in the next line. Type it and press Enter.
If you are working on local generally you wont need a password and can hence type
mysql -u root
4. From the MySQL prompt to select the database type
5. Now to import the file type
Like if the file is in drive F and is named test.sql, you need to type
That would import the file. Hope you find the post useful. Njoy 🙂