List:MySQL on Win32« Previous MessageNext Message »
From:Guido Gloor Date:April 27 2011 9:58am
Subject:Re: Problem with binary Blobs upon dump / restore
View as plain text  
I meanwhile managed to fix this issue - it was a combination of the 32-Bit
mysqld apparently not correctly interpreting the dump indeed, and Ruby 1.8.7
(oups) having issues with the encoding. After I switched to 64-Bit mysqld
5.5 (which did correctly interpret the dump) and used Ruby 1.9.2 with a
self-compiled mysql (driver) Gem, it started working.

Copying the database directory is, unfortunately, not possible since the
server's MySQL is a shared machine. I wouldn't even have access to the data
directory in the first place. I did run a mysql_upgrade after importing the
dump though, just to be safe - it certainly didn't hurt. Also, I can't
imagine shutting down the database every time I want to draw a backup or
update the development or test environment, that would not be practical
since it would harm database and thus application uptime. But thanks for the
help anyway!

Cheers,
Guido

On Wed, Apr 20, 2011 at 15:09, Jorge Bastos <mysql.jorge@stripped> wrote:

> Do not dump the database.
>
> Login to the Linux machine, stop MySQL, and copy the database directory.
> Then on windows to be sure the everything stays OK, run a mysql_upgrade -u
> user --password to upgrade/check the tables.
>
>
> > -----Original Message-----
> > From: Guido Gloor [mailto:guido.gloor@stripped]
> > Sent: quarta-feira, 20 de Abril de 2011 13:43
> > To: win32@stripped
> > Subject: Problem with binary Blobs upon dump / restore
> >
> > Hi all :)
> >
> > I have a bit of a problem with a MySQL installation on a Win7 machine.
> > Technically, it's a 64-Bit installation, but hear me out.
> >
> > I'm trying to access binary data that comes from a mysqldump on an
> > Ubuntu
> > machine, which I'm fairly certain is running a 64 Bit mysqld, and it
> > seems
> > that the data I get is corrupted if I access either the dump or the
> > data
> > with a 32 Bit component. Because I'm using Ruby (and Rails), and Ruby
> > is
> > only available as 32 Bit binary on Windows (and apparently, compiling
> > 64 Bit
> > binaries is not a solved problem
> > yet<http://groups.google.com/group/rubyinstaller/browse_thread/thread/b
> > 628af0efaaae5bd/a50434c33b4634f8>),
> > I appear to be stuck with using the 32 Bit libmysql.dll. Attempting to
> > compile the 32 Bit Ruby components with a 64 Bit libmysql.dll leads to
> > failure, which I meanwhile realize should have been rather obvious to
> > me
> > from the start (or am I mistaken?).
> >
> > Now, what works is:
> >
> >    - I can dump the data just fine on the Ubuntu machine, and get it
> > back
> >    into working order both on a 64 Bit Windows mysqld and on a 64 Bit
> > Mac
> >    mysqld.
> >    - I can retreive the data just fine when using a 64 Bit libmysql (on
> > the
> >    Mac) from both the 64 Bit Windows mysqld and the 64 Bit Mac mysqld.
> >
> > What doesn't work is:
> >
> >    - I cannot get the dump back into working order on a 32 Bit Windows
> >    mysqld (if I try that, neither a 32 Bit libmysql nor a 64 Bit one
> > will be
> >    able to retrieve the correct binary data).
> >    - I cannot retreive the binary data correctly with a 32 Bit
> > libmysql,
> >    neither from the 64 Bit Windows mysqld nor the 64 Bit Mac one.
> >
> > I verified that this works the same with both UTF8 and Latin1 encodings
> > in
> > the dump, both explicit and (in the case of UTF8) implicit - I do not
> > believe that it is an encoding problem because the 64 Bit libmysql is
> > able
> > to correctly retrieve data imported from the dump (no corrupted binary
> > files). I also checked it with both MySQL 5.1 and 5.5, recompiling the
> > Ruby
> > accessor gem (and I tried both mysql and mysql2) between versions, and
> > I get
> > exactly the same behaviour.
> >
> > I am not extremely happy with using a 32 Bit libmysql to access a 64
> > Bit
> > mysqld, can that lead to problems? I do not think that it's the only
> > problem
> > even if it can be one, as 32 Bit libmysql to 32 Bit mysqld does not
> > work
> > properly, either (because the 32 Bit mysqld does not appear to be able
> > to
> > properly import the 64 Bit mysqldump in the first place).
> > Interestingly, the
> > 64 Bit libmysql (but again, not the 32 Bit libmysql) is able to
> > correctly
> > retrieve data from a 32 Bit mysqld if I do not let the 32 Bit mysqld
> > import
> > the data, but copy the InnoDB data files over from a 64 Bit mysqld
> > import.
> >
> > Any ideas?
> >
> > Cheers,
> > Guido Gloor
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:    http://lists.mysql.com/win32?unsub=1
>
>

Thread
Problem with binary Blobs upon dump / restoreGuido Gloor20 Apr
  • RE: Problem with binary Blobs upon dump / restoreJorge Bastos20 Apr
Re: Problem with binary Blobs upon dump / restoreGuido Gloor27 Apr