Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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 !?

share|improve this question
    
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 ??? –  RolandoMySQLDBA Feb 6 '12 at 23:38
    
I mean I have data, sorry ;) –  AliBZ Feb 6 '12 at 23:49
    
I have a question: Do I get the bounty ? –  RolandoMySQLDBA Feb 8 '12 at 21:05
    
Thank you for the bounty !!! –  RolandoMySQLDBA Feb 9 '12 at 23:42
    
Thanx for your help ;) –  AliBZ Feb 18 '12 at 1:01

2 Answers 2

up vote 2 down vote accepted
+50

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

[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend
innodb_log_files_in_group=3
innodb_log_file_size=256M
innodb_buffer_pool_size=768M
log-bin=mysql-bin

You need to start the service manually

C:\> cd "C:\Program Files\MySQL\MySQL Server 5.5\bin"
C:\> 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

share|improve this answer
    
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 Feb 6 '12 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.

share|improve this answer
    
Hi, the dir is ok. –  AliBZ Feb 6 '12 at 4:20

Your Answer

 
discard

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.