Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to know if there is a way to recover the data of a de-installed mysql server.

share|improve this question
What exactly do you mean by uninstalled/deinstalled?? – Chris S May 18 '11 at 12:25
I mean removing mysql from windows add/remove – Navid May 18 '11 at 12:36
up vote 2 down vote accepted

The mysql databases are usually stored as files in the filesystem in some location different from the mysqld binaries (e.g. /var/lib/mysql) and not deleted during package removal. You can access the data just by configuring a mysql instance's "datadir" to look there and launching it.


datadir         = /var/lib/mysql

Just search your filesystem for files named "ibdata1", "*.MYD" (myISAM table data) or "*.MYI" (myISAM table indexes) to get a clue where your files might be if your old my.cnf is not accessible for a reference anymore.

share|improve this answer
Not a *nix system... – Chris S May 18 '11 at 12:42
I've just seen you are using Windows. In this case the datadir is per default in %programfiles%\MySQL\MySQL Server <version>\Data. Is this directory still present on your system? – the-wabbit May 18 '11 at 12:44
the problem is I cannot find this directory, can't it be somewhere else? – Navid May 18 '11 at 12:47
@Navid, it can be just about anywhere (on the computer, network, SAN, remote sites connected via VPN... heck, you might be using cloud storage for all we know); if it isn't in that folder. – Chris S May 18 '11 at 12:51
Just run a search for *.MYD across your disks. If you don't find anything, the data is probably gone. You might want to check out some data recovery / undelete tools if you don't have a backup and really really need that data and a partial recovery would do for you - the chances of getting it back in one piece and complete are usually rather bad. – the-wabbit May 18 '11 at 13:10

It should still be in the installation location, under the data folder (ex, C:\Program Files\MySQL\MySQL Server 4.0\Data)

share|improve this answer

When MYSQL is uninstalled all the folders are removed except data folder present at.

C:\Program Files\MySQL\MySQL Server 5.0\data

At this location a folder having name same as the schema/database on which you were working earlier will be present.Copy this folder and ibdata1 file at a separate location.

Now reinstall MYSQL again and copy the earlier saved contents(*folder* and ibdata1) at this location

Open Mysql Administrator and perform the backup of database.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.