How to import huge data file to MySQL

Recently I have a problem while importing the database file to mysql database using phpmyadmin. My file size has huge amount than they given. i.e. my file has morethan 2.5 MB.

For this, I have import and export data to database by using the following commands.

1) Import data to my database

E:\> mysql -u "mysql_user_name" -p"mysql_password" myapp_development < rails_backup.sql 

2) Export Data from database as sql file

E:\> mysql -u "mysql_user_name" -p"mysql_password" myapp_development > rails_backup.sql

Here "myapp_development" is my database name.

2 comments:

  1. first of all i would like to thanks for sharing such very useful information and i have followed your steps but still i am not able to import my data.i am associated with a ruby on rails development company and they have huge data which we need to import.

    ReplyDelete
    Replies
    1. Can i know, what is the error you are getting ?

      Delete