Link to home
Start Free TrialLog in
Avatar of johnhardy
johnhardyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Import dumped MySql file into database on local machine

I have a MySql database on the 1and1 linux server.

I exported the database on the 1and1 server into a dumped file on my local machine.
I wish to import/update this on to the original db on to my local machine.

I cannot find any way to do this, I am using Navicat or phpmyadmin

I know the location of the dumped file

Can anyone please assist?

Many thanks

John
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you're using command-line Mysql, change into the directory in which the dump file exists first. Then start command-line mysql.  Create your DB and "use" that Db.

Then say
source filename;

I restore from dump files frequently with this.  Now ... for some reason ... the dump files do not usually include the stored procedures.  So if you have SP's, you'll need to add them separately.
Avatar of johnhardy

ASKER

Thanks for the help. I had tried import previously but it did not work. I tried again just now and it completed OK. It took 3 or 4 minutes. Maybe I did not allow it to complete previously.

I dont normally use command line,

Regards

John
You're welcome, glad to help.