[Gllug] Extract the data from a MySQL database's *files*?

Dave Cross dave at dave.org.uk
Thu Apr 1 14:41:32 UTC 2010


On 04/01/2010 03:26 PM, Richard Jones wrote:
> On Thu, Apr 01, 2010 at 02:39:55PM +0100, Richard Huxton wrote:
>> On 01/04/10 14:29, Richard Jones wrote:
>>>
>>> I've got a friend who has a VM image.  This image used to be a MySQL
>>> database instance, but for various reasons we cannot boot it any more.
>>>
>>> However, the raw MySQL database files are still on there.
>>>
>>> Can we extract the data somehow?  Can we tell another MySQL instance
>>> to look at these files?
>>
>> If you have actual files, then yes. Can you mount the image's virtual 
>> disks OK?
> 
> Yup, the /var filesystem is fine, it just cannot be booted because
> there is no operating system.
> 
> So I have the /var/... mysql files, including a Wordpress database,
> and I just want to extract that to another MySQL instance.

If you can access the old /var/lib/mysql/<dbname>/*.frm files then I've
had success before just copying them to the same place on a new server
and making sure the file ownership and permissions are right[1].

Might not work if the versions of the MySQL server software differ by
more than a minor version or two.

Cheers,

Dave...

[1] On Linux that's usually mysql:mysql and 660.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list