dongwei1895 2017-04-18 14:41
浏览 58

在带有wordpress多站点的AWS EC2上意外卸载了mysql。 需要一点指导

I have a wordpress multisite installation running on an AWS EC2 (t2.medium).

After messing around trying to get phpmyadmin installed on the server I accidentally deleted httpd,mysql-server etc. It broke everything.

Thankfully, I used a plugin called Snapshot from wpmu-dev and had everything backed up but now I'm running into some trouble and not entirely sure how to do this.

Current situation: 1. Created an instance snapshot through my aws dashboard. 2. Backed up everything from /var/www/html/ to my local drive. 3. Reinstalled mysql and httpd, started it, went through the steps provided here - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html - however, when setting up the database it states that wordpress-db and the user are already there and my old password still works yet wordpress isn't working?

So I'm not sure where to go from here, shall I just delete my instance and start again from scratch? Loading what I need back into the /var/www/html folder? Or is there a way that I can completely delete my database and then rebuild the tables with the snapshot and get back to where I started?

Thanks in advance for your help folks, really stuck here, have a website that's down!

  • 写回答

1条回答 默认 最新

  • duanganleng0577 2017-04-18 20:33
    关注

    If you are not sure what happened I would recommend you start from scratch.

    1. Launch an EC2 instance and follow the steps on the guide you provided: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
    2. Download MySQL workbench and connect to the database (remember modifying the security permissions temporarily to be able to connect to the database from your computer) (https://dev.mysql.com/downloads/workbench/)
    3. Restore the sql backup (if you have one, or create one if you don't) to restore the database to your new ec2 instance MySQL. You can do this following the Data import section: https://dev.mysql.com/doc/workbench/en/wb-admin-export-import-management.html
    4. Make sure the configuration file is correct (url, database path, name, etc) (https://codex.wordpress.org/Editing_wp-config.php)
    5. I would recommend to point your domain to your new ec2 instance only after it has been properly configured and tested.
    评论

报告相同问题?

悬赏问题

  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow