2

I have a huge mysql dump file generated from phpmyAdmin (150 000 lines of create table, inserts....)

The mySql query tool fails to open such a big file. As a result i can't insert all the records.

Is there a way to do this ? Thanks John

1
  • Is it the command line 'mysql' tool that fails to load the file? Usually something like mysql -p -h DBSERVER dbname < dbname.sql should work. Commented May 28, 2010 at 13:44

2 Answers 2

5

The solution to restore large mysql database from sql dump file is using unix/linux shell command. To restore mysql database from a dump file, just type the command below:

mysql -u #username# -p #database# < #dump_file#

Of course you need to replace #username# to your database username and #database# to your target database. and rename #dump_file# to your dump file file name (Ex: dump.sql) Once you enter the command, the linux/unix shell will prompt you for your database user password, just key in your database password and you are done

borrowed from: http://www.techiecorner.com/31/how-to-restore-mysql-database-from-sql-dump-file/

Sign up to request clarification or add additional context in comments.

Comments

0

Split the file by parts. First the CREATE instructions, then the inserts.

1 Comment

i can't even open the file with notepad ++! I was wondering if a tool could read line by line..

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.