Re: Re-attaching DB to mysql

2003-07-24 Thread Nils Valentin
Hope I could be of help.

Best regards

Nils Valentin
Tokyo/Japan

2003年 7月 24日 木曜日 22:51、Henrik Schmiediche さんは書きました:
> Thanks for the help!
>
> - Henrik
>
>
> -Original Message-
> From: Nils Valentin [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 23, 2003 10:19 PM
> To: Henrik Schmiediche; 'Andrew Braithwaite'; 'Mysql'
> Subject: Re: Re-attaching DB to mysql
>
> Hi Hendrik,
>
> not sure if you have already received an answer, so please ignore if you
> are
> already back on track ;-)
>
> I did not find which OS you are using , but under Linux/Unix you would
> need to
> change the ownership back to the user "mysql" and the group "mysql"
> before
> you can use the copied data again.
>
> Go into your data folder (/var/lib/mysql for an rpm install) and do:
>
> chown -R mysql foldername
> chgrp -R msql foldername
>
> That should make them accessable again (assuming MySQL uses the owner
> and
> group "mysql".
>
> Best regards
>
> Nils Valentin
> Tokyo/Japan
>
> 2003年 7月 24日 木曜日 04:05、Henrik Schmiediche さんは書きました:
> > Copy of the data files :-(
> >
> > - Henrik
> >
> >
> > -Original Message-
> > From: Andrew Braithwaite [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 23, 2003 2:04 PM
> > To: 'Henrik Schmiediche'; 'Mysql'
> > Subject: RE: Re-attaching DB to mysql
> >
> > Is the backup a mysqldump or a copy of the data files?
> >
> > Andrew
> >
> > -Original Message-
> > From: Henrik Schmiediche [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday 23 July 2003 19:48
> > To: 'Mysql'
> > Subject: Re-attaching DB to mysql
> >
> >
> >
> >
> >  Hello,
> > I have a backup of a mysql v3.0.18 DB. I need to extract one of the
>
> DB's
>
> > from that backup and place it into my current production v4.0.14 mysql
> > DB.
> >
> > Can this be done? How?
> >
> > Sincerely,
> >
> >- Henrik
> >
> >
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> > http://lists.mysql.com/[EMAIL PROTECTED]

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Re-attaching DB to mysql

2003-07-24 Thread Egor Egorov
"Henrik Schmiediche" <[EMAIL PROTECTED]> wrote:
> 
> I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
> from that backup and place it into my current production v4.0.14 mysql
> DB.

3.0.18? Are you sure?

> 
> Can this be done? How?

How did you make a backup? If you use mysqldump, you can restore as:

mysql -uuser_name -puser_password database_name < backup_file.sql



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Re-attaching DB to mysql

2003-07-23 Thread Nils Valentin
Hi Hendrik,

not sure if you have already received an answer, so please ignore if you are 
already back on track ;-)

I did not find which OS you are using , but under Linux/Unix you would need to 
change the ownership back to the user "mysql" and the group "mysql" before 
you can use the copied data again.

Go into your data folder (/var/lib/mysql for an rpm install) and do:

chown -R mysql foldername
chgrp -R msql foldername

That should make them accessable again (assuming MySQL uses the owner and 
group "mysql".

Best regards

Nils Valentin
Tokyo/Japan


2003年 7月 24日 木曜日 04:05、Henrik Schmiediche さんは書きました:
> Copy of the data files :-(
>
> - Henrik
>
>
> -Original Message-
> From: Andrew Braithwaite [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 23, 2003 2:04 PM
> To: 'Henrik Schmiediche'; 'Mysql'
> Subject: RE: Re-attaching DB to mysql
>
> Is the backup a mysqldump or a copy of the data files?
>
> Andrew
>
> -Original Message-
> From: Henrik Schmiediche [mailto:[EMAIL PROTECTED]
> Sent: Wednesday 23 July 2003 19:48
> To: 'Mysql'
> Subject: Re-attaching DB to mysql
>
>
>
>
>  Hello,
> I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
> from that backup and place it into my current production v4.0.14 mysql
> DB.
>
> Can this be done? How?
>
> Sincerely,
>
>- Henrik
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Re-attaching DB to mysql

2003-07-23 Thread Andrew Braithwaite
The mysqldump you use doesn't include the "create databease" so you'll need
to create the henrik DB on the new install. If you keep running it over and
over, it will keep inserting the same records over and over again and you'll
end up with duplicates. The thing to do is start with an empty db (call it
whatever you like) and run the restore just once.  This should give you a
nice clean backup restore to then do whatever you want with...

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 21:07
To: Andrew Braithwaite; 'Mysql'
Subject: RE: Re-attaching DB to mysql



Thanks for the reply.

I started a mysql v3 on a new system with the old "backup" data directory
and type:

   mysqldump -p henrik > henrik.sql

This dumps the DB? To restore, I move henrik.sql to the current 4.0.14
server and type:

   mysql -p henrik < henrik.sql

except it complains the DB does not exists. I can create the DB in Mysql 4
and then restore (and it works), but it is not clear to me I will have
restored everything properly.

Sincerely,

   - Henrik


-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 2:59 PM
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql

Hi,

If that backup uses the old ".ISD & .ISM" architecture then I would install
an old version of MySQL, copy these files into the data dir of that
installation and mysqldump them to a file ready for import into your new
MySQL v4 install.

I'm not aware of any scripts to just munge the old style data into the new
but I'm happy to be corrected on that!

Cheers,

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 20:05
To: Andrew Braithwaite; 'Mysql'
Subject: RE: Re-attaching DB to mysql



Copy of the data files :-(

- Henrik


-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 2:04 PM
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql

Is the backup a mysqldump or a copy of the data files?

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 19:48
To: 'Mysql'
Subject: Re-attaching DB to mysql




 Hello,
I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
from that backup and place it into my current production v4.0.14 mysql DB.

Can this be done? How?

Sincerely,

   - Henrik




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Re-attaching DB to mysql

2003-07-23 Thread Andrew Braithwaite
And from the MySQL docs:

--clip
MySQL Version 3.23 supports tables of the new MyISAM type and the old ISAM
type. You don't have to convert your old tables to use these with Version
3.23. By default, all new tables will be created with type MyISAM (unless
you start mysqld with the --default-table-type=isam option). You can convert
an ISAM table to MyISAM format with ALTER TABLE table_name TYPE=MyISAM or
the Perl script mysql_convert_table_format. 
--/clip---

You could install this "halfway house" version or just get hold of the perl
scripts and run the "mysql_convert_table_format" script

You've got me interested now - I should be doing "real" work instead... :)

Andrew


-Original Message-
From: Andrew Braithwaite 
Sent: Wednesday 23 July 2003 20:59
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql


Hi,

If that backup uses the old ".ISD & .ISM" architecture then I would install
an old version of MySQL, copy these files into the data dir of that
installation and mysqldump them to a file ready for import into your new
MySQL v4 install.

I'm not aware of any scripts to just munge the old style data into the new
but I'm happy to be corrected on that!

Cheers,

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 20:05
To: Andrew Braithwaite; 'Mysql'
Subject: RE: Re-attaching DB to mysql



Copy of the data files :-(

- Henrik


-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 2:04 PM
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql

Is the backup a mysqldump or a copy of the data files?

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 19:48
To: 'Mysql'
Subject: Re-attaching DB to mysql




 Hello,
I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
from that backup and place it into my current production v4.0.14 mysql DB.

Can this be done? How?

Sincerely,

   - Henrik




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Re-attaching DB to mysql

2003-07-23 Thread Henrik Schmiediche

Thanks for the reply.

I started a mysql v3 on a new system with the old "backup" data
directory and type:

   mysqldump -p henrik > henrik.sql

This dumps the DB? To restore, I move henrik.sql to the current 4.0.14
server and type:

   mysql -p henrik < henrik.sql

except it complains the DB does not exists. I can create the DB in Mysql
4 and then restore (and it works), but it is not clear to me I will have
restored everything properly.

Sincerely,

   - Henrik


-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 2:59 PM
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql

Hi,

If that backup uses the old ".ISD & .ISM" architecture then I would
install
an old version of MySQL, copy these files into the data dir of that
installation and mysqldump them to a file ready for import into your new
MySQL v4 install.

I'm not aware of any scripts to just munge the old style data into the
new
but I'm happy to be corrected on that!

Cheers,

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 20:05
To: Andrew Braithwaite; 'Mysql'
Subject: RE: Re-attaching DB to mysql



Copy of the data files :-(

- Henrik


-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 2:04 PM
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql

Is the backup a mysqldump or a copy of the data files?

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 19:48
To: 'Mysql'
Subject: Re-attaching DB to mysql




 Hello,
I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
from that backup and place it into my current production v4.0.14 mysql
DB.

Can this be done? How?

Sincerely,

   - Henrik




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Re-attaching DB to mysql

2003-07-23 Thread Andrew Braithwaite
Hi,

If that backup uses the old ".ISD & .ISM" architecture then I would install
an old version of MySQL, copy these files into the data dir of that
installation and mysqldump them to a file ready for import into your new
MySQL v4 install.

I'm not aware of any scripts to just munge the old style data into the new
but I'm happy to be corrected on that!

Cheers,

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 20:05
To: Andrew Braithwaite; 'Mysql'
Subject: RE: Re-attaching DB to mysql



Copy of the data files :-(

- Henrik


-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 2:04 PM
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql

Is the backup a mysqldump or a copy of the data files?

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 19:48
To: 'Mysql'
Subject: Re-attaching DB to mysql




 Hello,
I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
from that backup and place it into my current production v4.0.14 mysql DB.

Can this be done? How?

Sincerely,

   - Henrik




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Re-attaching DB to mysql

2003-07-23 Thread Henrik Schmiediche

Copy of the data files :-(

- Henrik


-Original Message-
From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 23, 2003 2:04 PM
To: 'Henrik Schmiediche'; 'Mysql'
Subject: RE: Re-attaching DB to mysql

Is the backup a mysqldump or a copy of the data files?

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 19:48
To: 'Mysql'
Subject: Re-attaching DB to mysql




 Hello,
I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
from that backup and place it into my current production v4.0.14 mysql
DB.

Can this be done? How?

Sincerely,

   - Henrik




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Re-attaching DB to mysql

2003-07-23 Thread Andrew Braithwaite
Is the backup a mysqldump or a copy of the data files?

Andrew

-Original Message-
From: Henrik Schmiediche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday 23 July 2003 19:48
To: 'Mysql'
Subject: Re-attaching DB to mysql




 Hello,
I have a backup of a mysql v3.0.18 DB. I need to extract one of the DB's
from that backup and place it into my current production v4.0.14 mysql DB.

Can this be done? How?

Sincerely,

   - Henrik




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]