BLOG

How to upload/import a mysql database of more than 2MB

[written by chirag jain - @jain_chirag04]

This post is for those who wants to upload a database of more than 2MB

With the default settings, phpmyadmin does not allow you to upload a database of more than 2mb. This setting can be changed but we avoid this for security reasons.

So here’s how you can do this using command line.

First run command prompt.

goto the bin directory of your mysql installation.

In my case its here: E:\wamp\bin\mysql\mysql5.1.33\bin

Run the below command in command prompt:

mysql -u username -p database_name < textfilewithsqlstatments.sql

This will ask you to enter the password.Enter the phpmyadmin password here and it will upload the files and execute all the sql commands in the .sql file.

Note: The path to the textfilewithsqlstatements.sql has to be correctly given in the command.


Leave a Reply

     

     

     



Technology

Contact Us