MySQL 5.5 changing data folder

Administration, Info.Tech, Operating Systems, SQL: Structured Query Language Add comments

Today, I’m having problem with my MySQL. I bought new computer and want to transfer my databases from my old PC (using winXP) to new PC which is using windows 7. When I copied all my databases from data folder from my old computer and paste it to my new PC at “C:\Program Files\MySQL\MySQL Server 5.5\Data”, and restart the MySQL, I can’t see my databases. I found a solution from and here’s the step (I slightly modified the step since i have different problem…)

  1. create folder in “C:\MySQLData”
  2. copy all files from “C:\Users\All Users\MySQL\MySQL Server 5.5\data” to “C:\MySQLData”
  3. go to RUN and type services.msc and stop MySQL service
  4. at “C:\Program Files\MySQL\MySQL Server 5.5” — edit the my.ini and change the datadir value to your new MySQL data folder which is “C:/MySQLData/”
  5. after changing the datadir, at Services window (services.msc) start again your MySQL
  6. then cast command in MySQL CLI “show databases” and you should get your migrated databases showing… 🙂



thanks to:

Rolando A. Edwards

Comments are closed.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in