1

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

4
  • 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 ??? Feb 6, 2012 at 23:38
  • I mean I have data, sorry ;)
    – AliBZ
    Feb 6, 2012 at 23:49
  • I have a question: Do I get the bounty ? Feb 8, 2012 at 21:05
  • Thanx for your help ;)
    – AliBZ
    Feb 18, 2012 at 1:01

2 Answers 2

3
+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:\> 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

1
  • 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, 2012 at 23:57
1

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.

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

Your Answer

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

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