I have installed mysql and XAMPP on my system. I wanted to remove the mysql service of XAMPP. After removing it, I tried to install the new service for mysql using "MySQLInstanceConfig.exe". but now I can't see any of my databases or tables. Have I lost all my data? The data folder in mysql directory is full.

This is a picture of my data folder. I have all the data here. but mysql can not read them.

enter image description here

Is there any way to make the mysql read these !?

  • BTW when you say The data folder in mysql directory is full, do you mean that there is no more room in drive C: or that you just have data ??? Commented Feb 6, 2012 at 23:38
  • I mean I have data, sorry ;)
    – AliBZ
    Commented Feb 6, 2012 at 23:49
  • I have a question: Do I get the bounty ? Commented Feb 8, 2012 at 21:05
  • Thanx for your help ;)
    – AliBZ
    Commented Feb 18, 2012 at 1:01

2 Answers 2


If the mysql service is up right now, shut it down

C:\> net stop mysql

You need to create my.ini

Go to C:\Program Files\MySQL\MySQL Server 5.5

You should see a bin folder and the data folder you have in your question

Create my.ini in C:\Program Files\MySQL\MySQL Server 5.5

I noticed you have

  • ibdata1
  • 3 innodb log files
  • binary logs that start with mysql-bin

Make sure you have these options in my.ini


You need to start the service manually

C:\> cd "C:\Program Files\MySQL\MySQL Server 5.5\bin"
C:\> net start mysqld

By default, when starting up mysqld like this, mysqld.exe expects the my.ini to initially be in its parent directory.

If mysql starts successfully, you should see mysqld.exe in the processlilst of the Task Manager and the file clarinet.err should have today's date. You can shut it down using:

C:\> cd "C:\Program Files\MySQL\MySQL Server 5.5\bin"
C:\> mysqladmin -uroot shutdown

Now configure mysql service so that it uses C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld.exe

  • I checked the my.ini file and I didn't have "Make sure you have these options in my.ini" part. So, I realized I could replace the new my.ini by the backup of of the old one. I did that and its ok now. Thanx man. you have saved me like a thousand times.
    – AliBZ
    Commented Feb 6, 2012 at 23:57

Check your MySql configuration for "datadir" and make sure it matches the location where your data was stored.

You can do this by editing my.ini in the install directory or load up Workbench and take a look at the Directories section of the General tab in a server admin session.

  • Hi, the dir is ok.
    – AliBZ
    Commented Feb 6, 2012 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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