简体   繁体   English

无法从Word的WAMP的旧安装(数据库)导入/复制数据库

[英]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. 我的WAMP服务器在几天前崩溃了,因此我将其卸载并重新安装。 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. 然后,我将wamp / bin / mysql / mysql5.6.17 / data的备份文件夹以及/ www /文件夹移到了新的安装文件夹。 The I reinstalled wordpress and it gave me WordPress database error. 我重新安装了wordpress,它给了我WordPress数据库错误。 I tried installing Apache and MySQL manually but that didn't work. 我尝试手动安装Apache和MySQL,但这没有用。 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. 我在具有G:\\ wamp路径的G:\\驱动器上安装了wamp,在崩溃之前,我备份了该文件夹以防万一。
  2. Since it has crashed, I uninstalled wamp and reinstalled it but this time I set the installation path to another folder E:\\wamp. 由于崩溃,我卸载了wamp并重新安装了它,但是这次我将安装路径设置为另一个文件夹E:\\ wamp。
  3. I then copied and pasted the backup folder to E:\\wamp. 然后,我将备份文件夹复制并粘贴到E:\\ wamp。
  4. I went to phpmyadmin, the database are all there. 我去了phpmyadmin,数据库都在那里。
  5. Then I tried accessing wordpress (localhost/mysite, say mysite is the www/mysite wordpress folder) 然后我尝试访问wordpress(localhost / mysite,说mysite是www / mysite wordpress文件夹)
  6. I followed the instruction to reinstall wordpress, but i likely got the login user and pw messed up. 我按照说明重新安装了wordpress,但是我很可能让登录用户和pw搞砸了。
  7. But all I got is database error. 但是我得到的只是数据库错误。
  8. I only want to import the data in wp_posts.ibd to the new installation. 我只想将wp_posts.ibd中的数据导入到新安装中。 Of course it would be good if my wordpress can be fully restored. 当然,如果我的wordpress可以完全恢复,那会很好。

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. 在安装WampServer时,安装过程的一部分会使用您安装的位置修改一些基本文件。 So when you copied the files that were originally installed on G:\\wamp to the new install on E:\\wamp everything gets VERY COMFUSED. 因此,当您将最初安装在G:\\ wamp上的文件复制到E:\\ wamp上的新安装文件时,所有内容都会变得非常混乱。

Here is what you should do :- 这是您应该做的:-

Uninstall the E:\\wamp install, and then manually delete the E:\\wamp folder completely. 卸载E:\\ wamp安装,然后完全手动删除E:\\ wamp文件夹。 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 . 现在将WampServer重新安装到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. 在执行其他任何操作之前,请检查这一切是否正常,例如,在运行localhost并运行phpMyAdmin时,检查是否获得WAMPServer主页。

Now to recover the databases you have, copy these from your backup. 现在要恢复您拥有的数据库,请从备份中复制这些数据库。

First stop WampServer, then copy 首先停止WampServer,然后复制

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 为了使您的网站恢复\\wamp\\www\\ (假设它们位于\\wamp\\www\\各个子文件夹中,请复制

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

This will restore YOUR files, Websites and Databases without effecting any of WAMPServers own files. 这将恢复您的文件,网站和数据库,而不会影响WAMPServer自己的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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