RE: Re: Re: Re: Readind a Dump W/o Expanding It
This may be too obvious, but what is in that text field? Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From: Ted Johnson [mailto:[EMAIL PROTECTED] > Sent: Monday, October 16, 2006 3:57 AM > To: Dan Buettner > Cc: mysql@lists.mysql.com > Subject: Re: Re: Re: Re: Readind a Dump W/o Expanding It > > 8080The data field's a text field, not a blob! That's the > problem, there are no blobs, and I just wanted a second set > of eyes on this to confirm what simply makes no sense at all! > I'd love to know where the dickens those images went!! > > Thanks anyway, > Ted > > - Original Message > From: Dan Buettner <[EMAIL PROTECTED]> > To: Ted Johnson <[EMAIL PROTECTED]> > Cc: mysql@lists.mysql.com > Sent: Sunday, October 15, 2006 8:45:07 PM > Subject: Re: Re: Re: Re: Readind a Dump W/o Expanding It > > Ted - sorry, not sure what this is showing me. Is the image data > supposed to be in the "data" field in the Photo table? It's not > there, or it's corrupt? > > Dan > > > On 10/15/06, Ted Johnson > <[EMAIL PROTECTED]> wrote: > > > > 74 > > - Original Message > > From: Dan Buettner <[EMAIL PROTECTED]> > > To: Ted Johnson <[EMAIL PROTECTED]> > > Cc: mysql@lists.mysql.com > > Sent: Sunday, October 15, 2006 9:22:04 AM > > Subject: Re: Re: Re: Readind a Dump W/o Expanding It > > > > How were they stored in the database? > > > > You got me on that. I just took over this box. Here's what > my queries show: > > > > server167# mysqlshow -uroot -p tirekingdom > > Enter password: > > Database: tirekingdom > > ++ > > | Tables | > > ++ > > | OrderItem | > > | Orders | > > | Photo | > > | PhotosForTire | > > | PhotosForWheel | > > | Shopper| > > | Tire | > > | Vehicle| > > | Wheel | > > | WheelMake | > > | WheelsForWheelMake | > > ++ > > server167# mysqlshow tirekingdom Photo -uroot -p > > Enter password: > > Database: tirekingdom Table: Photo Rows: 2160 > > > +---+-+---+--+-+-- > ---+---+-+-+ > > | Field | Type| Collation | Null | Key | > Default | Extra | > > Privileges | Comment | > > > +---+-+---+--+-+-- > ---+---+-+-+ > > | oid | int(11) | NULL | | PRI | 0 > | | > > select,insert,update,references | | > > | Data | mediumtext | latin1_swedish_ci | YES | | > | | > > select,insert,update,references | | > > | Type | varchar(4) | latin1_swedish_ci | YES | | > | | > > select,insert,update,references | | > > | Name | varchar(32) | latin1_swedish_ci | YES | | > | | > > select,insert,update,references | | > > > +---+-+---+--+-+-- > ---+---+-+-+ > > server167# mysqlshow tirekingdom PhotoForTires -uroot -p > > Enter password: > > mysqlshow: Cannot list columns in db: tirekingdom, table: > PhotoForTires: > > Table 'tirekingdom.PhotoForTires' doesn't exist > > server167# mysqlshow -uroot -p tirekingdom PhotosForTire > > Enter password: > > Database: tirekingdom Table: PhotosForTire Rows: 1058 > > > +-+-+---+--+-+-+-- > -+-+-+ > > | Field | Type| Collation | Null | Key | Default | Extra | > > Privileges | Comment | > > > +-+-+---+--+-+-+-- > -+-+-+ > > | TireID | int(11) | NULL | | PRI | 0 | | > > select,insert,update,references | | > > | PhotoID | int(11) | NULL | | PRI | 0 | | > > select,insert,update,references | | > > > +-+-+---+--+-+-+-- > -+-+-+ > > server167# mysqlshow -uroot -p tirekingdom PhotosForWheel > > Enter password: > >
Re: Re: Re: Re: Readind a Dump W/o Expanding It
8080The data field's a text field, not a blob! That's the problem, there are no blobs, and I just wanted a second set of eyes on this to confirm what simply makes no sense at all! I'd love to know where the dickens those images went!! Thanks anyway, Ted - Original Message From: Dan Buettner <[EMAIL PROTECTED]> To: Ted Johnson <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Sunday, October 15, 2006 8:45:07 PM Subject: Re: Re: Re: Re: Readind a Dump W/o Expanding It Ted - sorry, not sure what this is showing me. Is the image data supposed to be in the "data" field in the Photo table? It's not there, or it's corrupt? Dan On 10/15/06, Ted Johnson <[EMAIL PROTECTED]> wrote: > > 74 > - Original Message > From: Dan Buettner <[EMAIL PROTECTED]> > To: Ted Johnson <[EMAIL PROTECTED]> > Cc: mysql@lists.mysql.com > Sent: Sunday, October 15, 2006 9:22:04 AM > Subject: Re: Re: Re: Readind a Dump W/o Expanding It > > How were they stored in the database? > > You got me on that. I just took over this box. Here's what my queries show: > > server167# mysqlshow -uroot -p tirekingdom > Enter password: > Database: tirekingdom > ++ > | Tables | > ++ > | OrderItem | > | Orders | > | Photo | > | PhotosForTire | > | PhotosForWheel | > | Shopper| > | Tire | > | Vehicle| > | Wheel | > | WheelMake | > | WheelsForWheelMake | > ++ > server167# mysqlshow tirekingdom Photo -uroot -p > Enter password: > Database: tirekingdom Table: Photo Rows: 2160 > +---+-+---+--+-+-+---+-+-+ > | Field | Type| Collation | Null | Key | Default | Extra | > Privileges | Comment | > +---+-+---+--+-+-+---+-+-+ > | oid | int(11) | NULL | | PRI | 0 | | > select,insert,update,references | | > | Data | mediumtext | latin1_swedish_ci | YES | | | | > select,insert,update,references | | > | Type | varchar(4) | latin1_swedish_ci | YES | | | | > select,insert,update,references | | > | Name | varchar(32) | latin1_swedish_ci | YES | | | | > select,insert,update,references | | > +---+-+---+--+-+-+---+-+-+ > server167# mysqlshow tirekingdom PhotoForTires -uroot -p > Enter password: > mysqlshow: Cannot list columns in db: tirekingdom, table: PhotoForTires: > Table 'tirekingdom.PhotoForTires' doesn't exist > server167# mysqlshow -uroot -p tirekingdom PhotosForTire > Enter password: > Database: tirekingdom Table: PhotosForTire Rows: 1058 > +-+-+---+--+-+-+---+-+-+ > | Field | Type| Collation | Null | Key | Default | Extra | > Privileges | Comment | > +-+-+---+--+-+-+---+-+-+ > | TireID | int(11) | NULL | | PRI | 0 | | > select,insert,update,references | | > | PhotoID | int(11) | NULL | | PRI | 0 | | > select,insert,update,references | | > +-+-+---+--+-+-+---+-+-+ > server167# mysqlshow -uroot -p tirekingdom PhotosForWheel > Enter password: > Database: tirekingdom Table: PhotosForWheel Rows: 1098 > +-+-+---+--+-+-+---+-+-+ > | Field | Type| Collation | Null | Key | Default | Extra | > Privileges | Comment | > +-+-+---+--+-+-+---+-+-+ > | WheelID | int(11) | NULL | | PRI | 0 | | > select,insert,update,references | | > | PhotoID | int(11) | NULL | | PRI | 0 | | > select,insert,update,references | | > +-+-+---+--+-+-+---+-+-+ > > So, where's the blob? It isn't in some file in the site, I've checked. > > Which way did you end up restoring the data? > > The first way you recommended. Using vi, I opened the file, set "ma" a
Re: Re: Re: Re: Readind a Dump W/o Expanding It
Ted - sorry, not sure what this is showing me. Is the image data supposed to be in the "data" field in the Photo table? It's not there, or it's corrupt? Dan On 10/15/06, Ted Johnson <[EMAIL PROTECTED]> wrote: 74 - Original Message From: Dan Buettner <[EMAIL PROTECTED]> To: Ted Johnson <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Sunday, October 15, 2006 9:22:04 AM Subject: Re: Re: Re: Readind a Dump W/o Expanding It How were they stored in the database? You got me on that. I just took over this box. Here's what my queries show: server167# mysqlshow -uroot -p tirekingdom Enter password: Database: tirekingdom ++ | Tables | ++ | OrderItem | | Orders | | Photo | | PhotosForTire | | PhotosForWheel | | Shopper| | Tire | | Vehicle| | Wheel | | WheelMake | | WheelsForWheelMake | ++ server167# mysqlshow tirekingdom Photo -uroot -p Enter password: Database: tirekingdom Table: Photo Rows: 2160 +---+-+---+--+-+-+---+-+-+ | Field | Type| Collation | Null | Key | Default | Extra | Privileges | Comment | +---+-+---+--+-+-+---+-+-+ | oid | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | | Data | mediumtext | latin1_swedish_ci | YES | | | | select,insert,update,references | | | Type | varchar(4) | latin1_swedish_ci | YES | | | | select,insert,update,references | | | Name | varchar(32) | latin1_swedish_ci | YES | | | | select,insert,update,references | | +---+-+---+--+-+-+---+-+-+ server167# mysqlshow tirekingdom PhotoForTires -uroot -p Enter password: mysqlshow: Cannot list columns in db: tirekingdom, table: PhotoForTires: Table 'tirekingdom.PhotoForTires' doesn't exist server167# mysqlshow -uroot -p tirekingdom PhotosForTire Enter password: Database: tirekingdom Table: PhotosForTire Rows: 1058 +-+-+---+--+-+-+---+-+-+ | Field | Type| Collation | Null | Key | Default | Extra | Privileges | Comment | +-+-+---+--+-+-+---+-+-+ | TireID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | | PhotoID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | +-+-+---+--+-+-+---+-+-+ server167# mysqlshow -uroot -p tirekingdom PhotosForWheel Enter password: Database: tirekingdom Table: PhotosForWheel Rows: 1098 +-+-+---+--+-+-+---+-+-+ | Field | Type| Collation | Null | Key | Default | Extra | Privileges | Comment | +-+-+---+--+-+-+---+-+-+ | WheelID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | | PhotoID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | +-+-+---+--+-+-+---+-+-+ So, where's the blob? It isn't in some file in the site, I've checked. Which way did you end up restoring the data? The first way you recommended. Using vi, I opened the file, set "ma" at the top, searched for the top of the database, entered "d`a" to delete everything above, searched for the bottom of the database, set "ma", entered G to go to the bottom, then "d`a" to delete everything else. It was a little more complicated than that, but with those steps involved. And the dumpfile you have - how has it been handled? I ask because if it contains binary data and was FTP'd from one machine to another the wrong way, that could have done it. No, it was there in the box all along. TIA, Ted -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Re: Re: Readind a Dump W/o Expanding It
74- Original Message From: Dan Buettner <[EMAIL PROTECTED]> To: Ted Johnson <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Sunday, October 15, 2006 9:22:04 AM Subject: Re: Re: Re: Readind a Dump W/o Expanding It How were they stored in the database? You got me on that. I just took over this box. Here's what my queries show: server167# mysqlshow -uroot -p tirekingdom Enter password: Database: tirekingdom ++ | Tables | ++ | OrderItem | | Orders | | Photo | | PhotosForTire | | PhotosForWheel | | Shopper| | Tire | | Vehicle| | Wheel | | WheelMake | | WheelsForWheelMake | ++ server167# mysqlshow tirekingdom Photo -uroot -p Enter password: Database: tirekingdom Table: Photo Rows: 2160 +---+-+---+--+-+-+---+-+-+ | Field | Type| Collation | Null | Key | Default | Extra | Privileges | Comment | +---+-+---+--+-+-+---+-+-+ | oid | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | | Data | mediumtext | latin1_swedish_ci | YES | | | | select,insert,update,references | | | Type | varchar(4) | latin1_swedish_ci | YES | | | | select,insert,update,references | | | Name | varchar(32) | latin1_swedish_ci | YES | | | | select,insert,update,references | | +---+-+---+--+-+-+---+-+-+ server167# mysqlshow tirekingdom PhotoForTires -uroot -p Enter password: mysqlshow: Cannot list columns in db: tirekingdom, table: PhotoForTires: Table 'tirekingdom.PhotoForTires' doesn't exist server167# mysqlshow -uroot -p tirekingdom PhotosForTire Enter password: Database: tirekingdom Table: PhotosForTire Rows: 1058 +-+-+---+--+-+-+---+-+-+ | Field | Type| Collation | Null | Key | Default | Extra | Privileges | Comment | +-+-+---+--+-+-+---+-+-+ | TireID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | | PhotoID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | +-+-+---+--+-+-+---+-+-+ server167# mysqlshow -uroot -p tirekingdom PhotosForWheel Enter password: Database: tirekingdom Table: PhotosForWheel Rows: 1098 +-+-+---+--+-+-+---+-+-+ | Field | Type| Collation | Null | Key | Default | Extra | Privileges | Comment | +-+-+---+--+-+-+---+-+-+ | WheelID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | | PhotoID | int(11) | NULL | | PRI | 0 | | select,insert,update,references | | +-+-+---+--+-+-+---+-+-+ So, where's the blob? It isn't in some file in the site, I've checked. Which way did you end up restoring the data? The first way you recommended. Using vi, I opened the file, set "ma" at the top, searched for the top of the database, entered "d`a" to delete everything above, searched for the bottom of the database, set "ma", entered G to go to the bottom, then "d`a" to delete everything else. It was a little more complicated than that, but with those steps involved. And the dumpfile you have - how has it been handled? I ask because if it contains binary data and was FTP'd from one machine to another the wrong way, that could have done it. No, it was there in the box all along. TIA, Ted
Re: Re: Re: Readind a Dump W/o Expanding It
How were they stored in the database? Which way did you end up restoring the data? And the dumpfile you have - how has it been handled? I ask because if it contains binary data and was FTP'd from one machine to another the wrong way, that could have done it. Dan On 10/15/06, Ted Johnson <[EMAIL PROTECTED]> wrote: That worked! Thanks! However, when I restored the database, it seemed to have trashed all the images. What do? TIA, Ted - Original Message From: Dan Buettner <[EMAIL PROTECTED]> To: Ted Johnson <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Saturday, October 14, 2006 9:59:31 PM Subject: Re: Re: Readind a Dump W/o Expanding It That's a little trickier, but definitely possible. I can think of 3 ways to do it, I'm sure there are others. Approach #1, works if your dumpfile is a manageable size: - make a copy and work from the copy - open the copy in a text editor, and find the line where your database starts. Delete everything above it. - locate the line where the next database starts, and delete everything below it. - save - pipe your altered file back into MySQL. You may need to CREATE DATABASE first. Approach #2, works if your dumpfile is not a manageable size - make a copy and work from the copy - using something like perl, open the copy and read line by line until you encounter where your database starts. Then continue reading but also writing out to a new file until you encounter the next line where a database starts. Close files and exit the script at that point. - pipe your output file back into MySQL. You may need to CREATE DATABASE first. Approach #3, works if you have a 2nd mysql server at your disposal - pipe full dumpfile into a MySQL installation - use mysqldump to dump just the database in question - pipe that dumpfile into your original server HTH, Dan On 10/14/06, Ted Johnson <[EMAIL PROTECTED]> wrote: > > That worked! It's there! Now...how can I rebuild *just* that database (which > was removed from my MySQL server) without affecting the other databases? > TIA, > Ted > > - Original Message > From: Dan Buettner <[EMAIL PROTECTED]> > To: Ted Johnson <[EMAIL PROTECTED]> > Cc: mysql@lists.mysql.com > Sent: Saturday, October 14, 2006 9:41:46 AM > Subject: Re: Readind a Dump W/o Expanding It > > Ted, if you're on a *NIX variant, you could use grep. Something like: > > cat DUMPFILE | grep Database: | grep Host: > > A dump file I have laying about has a line like this: > -- Host: localhostDatabase: outsell_web_prod > > and the command above finds that line. Getting a little fancier with > grep could filter the excess out of the line. > > Hope this helps, > Dan > > > On 10/14/06, Ted Johnson > <[EMAIL PROTECTED]> wrote: > > 107Hi; > > Is there a command by which I can read the names of databases in a > mysqldump without expanding the dump into my mysql instance (and thus > overwriting databases already extant)? > > TIA, > > Ted > > > > > > > > > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Re: Readind a Dump W/o Expanding It
That worked! Thanks! However, when I restored the database, it seemed to have trashed all the images. What do? TIA, Ted - Original Message From: Dan Buettner <[EMAIL PROTECTED]> To: Ted Johnson <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Saturday, October 14, 2006 9:59:31 PM Subject: Re: Re: Readind a Dump W/o Expanding It That's a little trickier, but definitely possible. I can think of 3 ways to do it, I'm sure there are others. Approach #1, works if your dumpfile is a manageable size: - make a copy and work from the copy - open the copy in a text editor, and find the line where your database starts. Delete everything above it. - locate the line where the next database starts, and delete everything below it. - save - pipe your altered file back into MySQL. You may need to CREATE DATABASE first. Approach #2, works if your dumpfile is not a manageable size - make a copy and work from the copy - using something like perl, open the copy and read line by line until you encounter where your database starts. Then continue reading but also writing out to a new file until you encounter the next line where a database starts. Close files and exit the script at that point. - pipe your output file back into MySQL. You may need to CREATE DATABASE first. Approach #3, works if you have a 2nd mysql server at your disposal - pipe full dumpfile into a MySQL installation - use mysqldump to dump just the database in question - pipe that dumpfile into your original server HTH, Dan On 10/14/06, Ted Johnson <[EMAIL PROTECTED]> wrote: > > That worked! It's there! Now...how can I rebuild *just* that database (which > was removed from my MySQL server) without affecting the other databases? > TIA, > Ted > > - Original Message > From: Dan Buettner <[EMAIL PROTECTED]> > To: Ted Johnson <[EMAIL PROTECTED]> > Cc: mysql@lists.mysql.com > Sent: Saturday, October 14, 2006 9:41:46 AM > Subject: Re: Readind a Dump W/o Expanding It > > Ted, if you're on a *NIX variant, you could use grep. Something like: > > cat DUMPFILE | grep Database: | grep Host: > > A dump file I have laying about has a line like this: > -- Host: localhostDatabase: outsell_web_prod > > and the command above finds that line. Getting a little fancier with > grep could filter the excess out of the line. > > Hope this helps, > Dan > > > On 10/14/06, Ted Johnson > <[EMAIL PROTECTED]> wrote: > > 107Hi; > > Is there a command by which I can read the names of databases in a > mysqldump without expanding the dump into my mysql instance (and thus > overwriting databases already extant)? > > TIA, > > Ted > > > > > > > > > > > > >
Re: Re: Readind a Dump W/o Expanding It
That's a little trickier, but definitely possible. I can think of 3 ways to do it, I'm sure there are others. Approach #1, works if your dumpfile is a manageable size: - make a copy and work from the copy - open the copy in a text editor, and find the line where your database starts. Delete everything above it. - locate the line where the next database starts, and delete everything below it. - save - pipe your altered file back into MySQL. You may need to CREATE DATABASE first. Approach #2, works if your dumpfile is not a manageable size - make a copy and work from the copy - using something like perl, open the copy and read line by line until you encounter where your database starts. Then continue reading but also writing out to a new file until you encounter the next line where a database starts. Close files and exit the script at that point. - pipe your output file back into MySQL. You may need to CREATE DATABASE first. Approach #3, works if you have a 2nd mysql server at your disposal - pipe full dumpfile into a MySQL installation - use mysqldump to dump just the database in question - pipe that dumpfile into your original server HTH, Dan On 10/14/06, Ted Johnson <[EMAIL PROTECTED]> wrote: That worked! It's there! Now...how can I rebuild *just* that database (which was removed from my MySQL server) without affecting the other databases? TIA, Ted - Original Message From: Dan Buettner <[EMAIL PROTECTED]> To: Ted Johnson <[EMAIL PROTECTED]> Cc: mysql@lists.mysql.com Sent: Saturday, October 14, 2006 9:41:46 AM Subject: Re: Readind a Dump W/o Expanding It Ted, if you're on a *NIX variant, you could use grep. Something like: cat DUMPFILE | grep Database: | grep Host: A dump file I have laying about has a line like this: -- Host: localhostDatabase: outsell_web_prod and the command above finds that line. Getting a little fancier with grep could filter the excess out of the line. Hope this helps, Dan On 10/14/06, Ted Johnson <[EMAIL PROTECTED]> wrote: > 107Hi; > Is there a command by which I can read the names of databases in a mysqldump without expanding the dump into my mysql instance (and thus overwriting databases already extant)? > TIA, > Ted > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]