473,320 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to copy a database

I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.
Jul 19 '05 #1
13 2914
Attempting to reach the Kolinahr, torjon wrote:
I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.


I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411
Jul 19 '05 #2
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.


I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?

By the way, when I do a dump, what dir does the dump go to--the root
of the db?

Thanks!! ps I'm using windows, msdos prompt. Sorry

Jul 19 '05 #3
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.


I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?

By the way, when I do a dump, what dir does the dump go to--the root
of the db?

Thanks!! ps I'm using windows, msdos prompt. Sorry

Jul 19 '05 #4
Attempting to reach the Kolinahr, torjon wrote:
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.
I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt
By the way, when I do a dump, what dir does the dump go to--the root of the db?
no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!
Jul 19 '05 #5
Attempting to reach the Kolinahr, torjon wrote:
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.
I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt
By the way, when I do a dump, what dir does the dump go to--the root of the db?
no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!
Jul 19 '05 #6
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.


I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?

By the way, when I do a dump, what dir does the dump go to--the root
of the db?

Thanks!! ps I'm using windows, msdos prompt. Sorry

Jul 19 '05 #7
Attempting to reach the Kolinahr, torjon wrote:
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.
I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt
By the way, when I do a dump, what dir does the dump go to--the root of the db?
no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!
Jul 19 '05 #8
On Thu, 08 Apr 2004 02:59:45 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:

I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.

I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt
By the way, when I do a dump, what

dir does the dump go to--the root of
the db?


no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!

Thanks!!!

Jul 19 '05 #9
On Thu, 08 Apr 2004 02:59:45 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:

I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.

I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt
By the way, when I do a dump, what

dir does the dump go to--the root of
the db?


no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!

Thanks!!!

Jul 19 '05 #10
On Thu, 08 Apr 2004 02:59:45 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:

I need to
1)Copy an entire mysql database, including table structres and data
2)install it into anotehr mysql db on another machine

How?

Or at lease direct me to net resources about this.

I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt
By the way, when I do a dump, what

dir does the dump go to--the root of
the db?


no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!

Thanks!!!

Jul 19 '05 #11
to****@NOSPAMnterport.net wrote:
On Thu, 08 Apr 2004 02:59:45 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:

Attempting to reach the Kolinahr, torjon wrote:

On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
>I need to
>1)Copy an entire mysql database, including table structres and data
>2)install it into anotehr mysql db on another machine
>
>How?
>
>Or at lease direct me to net resources about this.

I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt

By the way, when I do a dump, what


dir does the dump go to--the root of
the db?


no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!


Thanks!!!

I use
mysqldump --add-drop-table databasename >file_you_are_writing_to.dmp

then on the new machine

mysql newmachines_database < file_you_are_writing_to.dmp

If you do this on a regular basis backing your database up to a stand-by
machine, using --add-drop-table lets you skip droping the database before you
can restore it on the new machine.
Jul 19 '05 #12
to****@NOSPAMnterport.net wrote:
On Thu, 08 Apr 2004 02:59:45 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:

Attempting to reach the Kolinahr, torjon wrote:

On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
>I need to
>1)Copy an entire mysql database, including table structres and data
>2)install it into anotehr mysql db on another machine
>
>How?
>
>Or at lease direct me to net resources about this.

I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt

By the way, when I do a dump, what


dir does the dump go to--the root of
the db?


no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!


Thanks!!!

I use
mysqldump --add-drop-table databasename >file_you_are_writing_to.dmp

then on the new machine

mysql newmachines_database < file_you_are_writing_to.dmp

If you do this on a regular basis backing your database up to a stand-by
machine, using --add-drop-table lets you skip droping the database before you
can restore it on the new machine.
Jul 19 '05 #13
to****@NOSPAMnterport.net wrote:
On Thu, 08 Apr 2004 02:59:45 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:

Attempting to reach the Kolinahr, torjon wrote:

On Sun, 04 Apr 2004 21:25:14 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Attempting to reach the Kolinahr, torjon wrote:
>I need to
>1)Copy an entire mysql database, including table structres and data
>2)install it into anotehr mysql db on another machine
>
>How?
>
>Or at lease direct me to net resources about this.

I guess you are looking for mysqldump ...

--
#Peace and long life ...
Registeret Linux user #292411

I've read the docs and there's lots of info on how to dump, but not
how to restore from that dump. Do you know the syntax?


If I'm not mistaken - not done it myself though - it should be something
like:
mysql -u root -p < dumpeddatafile.txt

By the way, when I do a dump, what


dir does the dump go to--the root of
the db?


no clue, but guess in the directory from where you perform the call.

Thanks!! ps I'm using windows, msdos prompt. Sorry


Well, that is in my personal opinion - which you just may ditch for free
- not good ...

/Andreas

--
#Peace and long life ...
Registeret Linux user #292411
If Mandrake goes RedHat, I go Slackware!


Thanks!!!

I use
mysqldump --add-drop-table databasename >file_you_are_writing_to.dmp

then on the new machine

mysql newmachines_database < file_you_are_writing_to.dmp

If you do this on a regular basis backing your database up to a stand-by
machine, using --add-drop-table lets you skip droping the database before you
can restore it on the new machine.
Jul 20 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Catherine Jo Morgan | last post by:
I get the point of backing up the database I'm working on, but what's a prototype copy? How do I make one and why is it important to work on that rather than on the main database? Or is this more...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
1
by: Rachel McConnell | last post by:
Hi, I am trying to import data using COPY, from a file containing thirty or so COPY commands each with 0 or more rows of data. Reason, I have a small data set I want to include into a database...
4
by: JIM.H. | last post by:
Hello, I am trying to write the data I got from a web service to my table in SQL Server I need to append the dataset wsDS to the dataset ds and do update. PVS.myWS.Loader load = new...
5
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. ...
2
by: miroku800 | last post by:
A little history I designed a program in VB6 which used an access database with the aid of a then workmate (who has now moved on and lost interest) which was in two parts. A master program and a...
1
by: Scott Gifford | last post by:
Hello, I'm working on an providing an iterator interface to a database. The basic thing I'm trying to accomplish is to have my iterator read rows from the database and return constructed...
8
by: Abandoned | last post by:
Hi. I want to copy my database but python give me error when i use this command. cursor.execute("pg_dump mydata old.dump") What is the problem ? And how can i copy the database with python ?...
1
by: ll | last post by:
Hi, I have copied a MS SQL database to my local machine and am testing it with ASP pages, locally, on IIS. I have a db connect page that keeps the current connections for the live database. My...
1
by: Coni | last post by:
Hello, I am following steps to implement security on access 2003 through distribution: I have split the database and I am trying to distribute it: I have copied the back end file and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.