Sruj
Sruj

Reputation: 1207

how to restore database in phpmyadmin using files from old wamp/bin/mysql?

I forgot to export db from phpmyadmin, but i have access to old wamp directory.

To restore db I only need to move files from wamp\bin\mysql\mysqlx.xx.x\data to new directory?

(old wamp is 32 bit, new is 64bit)

Upvotes: 0

Views: 1320

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94682

Ok, so as its WAMPServer, you can have more than one version of MYSQL installed so this should work for you.

Stop WAMPServer

Copy \oldwamp\bin\mysql\mysqlx.xx.x and all its sub directories into newwamp\bin\mysql so you should now have 2 folders under the \wamp\bin\mysql` folder like this

newwamp\bin\mysql\mysqlx.xx.x
newwamp\bin\mysql\mysqly.yy.y

Start WAMPServer

Now using the wampmanager menus do this to activate the old version of MYSQL

wampmanager -> MYSQL -> Version -> x.xx.xx

Now you can run your export using phpMyAdmin against your old data. Put the exports somewhere safe

Now activate the new version of MYSQL

wampmanager -> MYSQL -> Version -> y.yy.yy

Now you can IMPORT your EXPORTS to the new version of MYSQL

If you like you could now delete the old newwamp\bin\mysql\mysqlx.xx.x folder and restart WAMPServer and that version will disappear.

Or you can leave it there, just in case you ever want to use it or re-do the exports

NOTE: Only export your databases and not any you did not create yourself, or you will mess the new version of MYSQL up.

For future viewers of this post. This will only work if you have a complete and undamaged old mysql folder i.e mysql.x.xx.xx folder and all its subfolders.

Upvotes: 3

Related Questions