Wednesday, 14 August 2013

Ubuntu Terminal: mysql -u username -p database_name < database.sql does not import completely

If ever you have encountered the issue mentioned in the title of this post, I have an alternative for that. I experienced that when I imported a very large sql file which is about 2GB.

What I did was I used the mysql command line client. I think you have an idea now how i did it.
But here we go. In your terminal, type mysql -u <your_username> -p. Then type of course type the password when prompted.

Then run use <database_name>; press enter.
And then, source sqlfile.sql;

That should do the trick. Just wait for it to finish importing.

No comments:

Post a Comment