[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 539
  • Last Modified:

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
0
johnhardy
Asked:
johnhardy
  • 2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
In phpMyAdmin, you would normally use the Import function.  Have you tried that?  It's on one of the tabs across the top.
0
 
Daniel WilsonCommented:
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.
0
 
johnhardyAuthor Commented:
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
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad to help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now