I all of a sudden started encountering this error “ssh_exchange_identification: read: Connection reset by peer” . then i tried turning off the droplet and on again and when i connected back the the linux, all my files on /var/www/html was wiped out, the sudo service mysql start returns this error: Sep 07 09:10:36 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: Failed to start MySQL Community Server. Sep 07 09:10:36 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Unit entered failed state. Sep 07 09:10:36 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Failed with result ‘exit-code’. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Service hold-off time over, scheduling restart. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: Stopped MySQL Community Server. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: Starting MySQL Community Server… Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 mysql-systemd-start[5980]: MySQL system database not found in /var/lib/mysql. Please run mysqld --initialize. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Control process exited, code=exited status=1 Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: Failed to start MySQL Community Server. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Unit entered failed state. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Failed with result ‘exit-code’. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Service hold-off time over, scheduling restart. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: Stopped MySQL Community Server. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: mysql.service: Start request repeated too quickly. Sep 07 09:10:37 ubuntu-s-2vcpu-4gb-sfo2-01 systemd[1]: Failed to start MySQL Community Server.
I have tried sudo mysqld —initialize and I got this error: 2018-09-07T08:45:45.504752Z 0 [ERROR] Can’t change data directory owner to mysql 2018-09-07T08:45:45.504983Z 0 [ERROR] Aborting
i have tried the recovery steps on this tutorial : https://www.digitalocean.com/docs/droplets/resources/recovery-iso/ with no luck.
Please how do I restore my os / recover my files. Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey friend!
This situation is a bit deeper than anyone can know from an external perspective. If you have a system administrator that you trust, you should ask them to review that server for you. Files don’t really just go missing from a reboot, and it’s especially odd if they do and yet the operating system still boots (as that kind of file system corruption is unlikely to specifically target items non-essential to boot).
My concern is that your server was compromised and configured by an attacker to act this way. Most likely you’re not going to restore that data in a meaningful way and should start pulling your external backups. I would not re-deploy on this server, but I would have a sysadmin look at it to see if any evidence remains of what occurred so that it might be prevented.
Jarland
It’s worth double-checking if you have backups enabled:
If snapshots and backups are not available, you can try using testdisk to recover deleted files. testdisk is a powerful data recovery tool that can work in some cloud environments. You can also check this article:
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.