Restore the server with the button inside the droplet configuration and now the apache, mysql and ssh services do not start

Posted July 31, 2020 1.1k views
PHPWordPressBackupsUbuntu 18.04

One day I needed to restore the server due to a problem that occurred with the wordpress that I had installed that was disabled and needed a quick solution. I gave him the option to restore from the droplet control panel that he had from a few days previous. When the server was restarted (without writing any command) I noticed that the services did not start automatically and now every time I turn off or restart the server, I have to start them manually

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Assuming you’re on Ubuntu,

systemctl enable apache2 mysql

Link for references.

Ps: MySQL is dead, I highly recommend using mariadb instead. All MySQL commands work and databases but you should do a dump just to be safe.

  • I get the following error:
    Press Enter for maintenance
    (or press Control-D to continue):

    If i enter control-D says:
    sulogin: cannot read /dev/tty1: Operation not permitted

    • Okay so your droplet has some serious issues. First off we need to get your site back up.

      Go to droplets > select your droplet > recovery > boot from iso and turn off the droplet then turn back on.

    • Once you’re on it will give you some options … chroot into filesystem and use “systemctl disable apache2 mysql” (or the opposite of whatever you ran if you ran something else.)

      Once that’s done exit and go back turn off the droplet and set it back to boot from hard disck. Turn it back on.

    • also, Make sure your /etc/fstab is all correct and reboot. I would recommend commenting out all lines except the essential ones (by putting # at the beginning of the line) and trying to reboot. If it works, try uncommenting the lines one by one and rebooting between each try to see which lines is the problem.

it works, comment inside fstab, becouse i make a swap memory before, after i commented its works fine. Thkx