在带有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!

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.