简体   繁体   中英

Fail to import/copy database from old installation (database) of WAMP for wordpress

My WAMP server crashed a few days ago and so I uninstalled and reinstalled it. However I changed the default installation location. I then moved the backup folder of wamp/bin/mysql/mysql5.6.17/data and also the /www/ folder to the new installation folder. The I reinstalled wordpress and it gave me WordPress database error. I tried installing Apache and MySQL manually but that didn't work. Any help will be highly appreciated!

Here is what I have done:

  1. I installed wamp on my G:\\ Drive which has a path of G:\\wamp, before it crashed, I backed up the folder in case I would need it.
  2. Since it has crashed, I uninstalled wamp and reinstalled it but this time I set the installation path to another folder E:\\wamp.
  3. I then copied and pasted the backup folder to E:\\wamp.
  4. I went to phpmyadmin, the database are all there.
  5. Then I tried accessing wordpress (localhost/mysite, say mysite is the www/mysite wordpress folder)
  6. I followed the instruction to reinstall wordpress, but i likely got the login user and pw messed up.
  7. But all I got is database error.
  8. I only want to import the data in wp_posts.ibd to the new installation. Of course it would be good if my wordpress can be fully restored.

Please help!

Ok that is much more clear and it identifies the problem.

When WampServer installs, part of the install process modifies some of the base files with the location of where you installed it. So when you copied the files that were originally installed on G:\\wamp to the new install on E:\\wamp everything gets VERY COMFUSED.

Here is what you should do :-

Uninstall the E:\\wamp install, and then manually delete the E:\\wamp folder completely. The uninstall wont remove any files that it didnt install or files it did install that have changed since the install.

Now reinstall WampServer into E:\\wamp . Check that this all works before doing anything else ie check you get the WAMPServer homepage when you run localhost and that phpMyAdmin runs.

Now to recover the databases you have, copy these from your backup.

First stop WampServer, then copy

backup:\wamp\bin\mysql\mysqlx.y.z to E:\wamp\bin\mysql\mysqlx.y.z

To get your websites back, assuming they are in various subfolders of \\wamp\\www\\ , copy

backup:\wamp\www\subfolder to E:\wamp\www\subfolder

This will restore YOUR files, Websites and Databases without effecting any of WAMPServers own files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM