Friday, December 17, 2010

How to change MySql Data folder location - Windows machine

1. Stop/Exit the MySql service.
2.  Go to the Data folder location which we see while doing the installation. Usually it is
    C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data
3. delete all files which names begins like ib_log*
4. Go to the mysql installed location . The default location is C:\Program files\MySQL\MySQL Server 5.0
    open/edit the my.ini file
5. find the section
   #path to the database root
   and change the value of datadir
6. save the my.ini file
7. start the MySQL service
  

3 comments:

  1. Thankq very much..it works Great..

    ReplyDelete
  2. just use the MySQLInstanceConfig.exe

    ReplyDelete
  3. hm... but the "my.ini" file is already in the current data dir, so if i change it, it stops to point to itself and must be moved also

    ReplyDelete