3

can u tell me how to import a 30mb of sql file in mysql.I am using ubuntu.

1
  • search for mysql yog for ubuntu Commented Apr 16, 2011 at 6:40

2 Answers 2

13

You have to run the following command

mysql -u <user> -p<password> dbname < filename.sql

Another alternate is also a command

log in to mysql using mysql -u <user> -p

mysql > use db_name;
mysql > source filename.sql;
Sign up to request clarification or add additional context in comments.

2 Comments

+1. It took me 10 seconds to import a 22MB file using CLI, whereas it was taking around 2 minutes to do the same thing via phpMyadmin
is this method recommended for 600 MB+ mysql files?
0

Use BigDump.php

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.