-1

My laptop's motherboard just died and I am accessing the hard drive from it via a USB adapter on my second computer.

I would like to download the contents of a MySQL 5.1.32 database that is located on the drive, so I can copy it to my other computer.

The MySQL install is part of a WAMP install and I am attempting to access it on an XP desktop.

Can somebody advise me on how to do this? Thanks!

1
  • open mysql console and type SHOW VARIABLES LIKE 'datadir';
    – X3R0
    Mar 17 at 8:26

5 Answers 5

2

You might be able to edit the my.cnf file and change the value of:

datadir=

To point to the data directory on the usb drive. Then start mysql on the new machine and export the data.

I don't know where my.cnf is on a Windows box. But that is what I would do on Linux.

2

Usually Mysql on Windows is installed in the "Program Files" directory (c:\Program Files\Mysql\Mysql server) and you should copy the entire "data" directory (which is container for all mysql databases in a standard installation).

If you don't find this folder, search the my.ini file (probably in c:\Program Files\Mysql\Mysql server) and read the "datadir" value, it show you where are the database directory.

2

mysql databases and tables reside in /var/lib/mysql folder

1

Any easy though not really approved method would be to install the same version of wamp that was on your laptop onto your second computer than then once it's installed just replace the mysql folder entirely.

0

Unfortunately, none of the provided answers worked for me. I ended up starting over from scratch.

Not the answer you're looking for? Browse other questions tagged .