Server Error (500)

After restarting the server, the database does not return.
using the commands to restore the database none of them worked

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # systemctl reload mysql
Failed to reload mysql.service: Unit mysql.service not found.

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # systemctl restart mysql
Failed to restart mysql.service: Unit mysql.service not found.

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # systemctl reload mysql.service
Failed to reload mysql.service: Unit mysql.service not found.

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # systemctl restart mysql.service
Failed to restart mysql.service: Unit mysql.service not found.

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # /etc/init.d/mysql restart
[…] Restarting mysql (via systemctl): mysql.serviceFailed to restart mysql.service: Unit mysql.service not found.
failed

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # /etc/init.d/mysql start
[…] Starting mysql (via systemctl): mysql.serviceFailed to start mysql.service: Unit mysql.service not found.
failed

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # service mysql restart
Failed to restart mysql.service: Unit mysql.service not found.

Checking:
root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # ps -aux | grep mysql
root 1928 0.0 0.1 14856 1084 pts / 0 S + 21:34 0:00 grep --color = auto mysql

mysql logs showed no error.

directory does not exist.
root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # cd / var / run / mysqld /
-bash: cd: / var / run / mysqld /: No such file or directory

I tried to create the file
root @ ubuntu-s-1vcpu-1gb-nyc3-01: / lib / systemd / system # systemctl enable mysql.service
Synchronizing state of mysql.service with SysV service script with / lib / systemd / systemd-sysv-install.
Executing: / lib / systemd / systemd-sysv-install enable mysql
Failed to enable unit: File mysql.service: Link has been severed

How to recover ???

Hi juanmaia,

May I ask you this CyberPanel was launch via DigitalOcean’s marketplace or you installed manually with command?

Is there any site installed already and was working fine until you reboot the server?

Please also try service mysqld start, see if it helps

Could you check the /var/log/mysql/error.log and /var/log/syslog when service start mysql and service start mysqld? See what it shows.

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # service start mysql
start: unrecognized service

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # service start mysqld
start: unrecognized service

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # service mysqld restart
Failed to restart mysqld.service: Unit mysqld.service not found.

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # service mysql restart
Failed to restart mysql.service: Unit mysql.service not found.

/var/log/mysql/error.log = is clean

/ var / log / syslog = has no related information

running this command

root @ ubuntu-s-1vcpu-1gb-nyc3-01: ~ # / usr / sbin / mysqld
2019-02-19 16:13:50 139689090555008 [Note] / usr / sbin / mysqld (mysqld 10.1.38-MariaDB-0ubuntu0.18.04.1) starting as process 29717 …

the sites returned [OK]
Cyber Server Error Panel (500)

cat /var/log/mysql/error.log
cat: /var/log/mysql/error.log: No such file or directory

– Unit pdns.service has begun starting up.
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Loading ‘/usr/lib64/pdns/libgmysqlbackend.so’
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: This is a standalone pdns
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Listening on controlsocket in ‘/var/run/pdns.controlsocket’
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: UDP server bound to 0.0.0.0:53
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: UDPv6 server bound to [::]:53
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: TCP server bound to 0.0.0.0:53
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: TCPv6 server bound to [::]:53
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: PowerDNS Authoritative Server 4.2.0-rc3 (C) 2001-2019 PowerDNS.COM BV
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Using 64-bits mode. Built using gcc 4.8.5 20150623 (Red Hat 4.8.5-36) on Aug 8 2019 20:58:24 by root@0c35504b30a1.
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Polled security status of version 4.2.0-rc3 at startup, no known issues reported: OK
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Creating backend connection for TCP
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: gmysql Connection failed: Unable to connect to database: Can’t connect to local MySQL server through socket '/var/lib/mysq
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Caught an exception instantiating a backend: Unable to launch gmysql connection: Unable to connect to database: Can’t conn
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Cleaning up
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: TCP server is unable to launch backends - will try again when questions come in: Unable to launch gmysql connection: Unabl
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: About to create 3 backend threads for UDP
Aug 24 00:30:51 sv.giaysihcm.com systemd[1]: Started PowerDNS Authoritative Server.
– Subject: Unit pdns.service has finished start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit pdns.service has finished starting up.

– The start-up result is done.
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: gmysql Connection failed: Unable to connect to database: Can’t connect to local MySQL server through socket '/var/lib/mysq
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Caught an exception instantiating a backend: Unable to launch gmysql connection: Unable to connect to database: Can’t conn
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Cleaning up
Aug 24 00:30:51 sv.giaysihcm.com pdns_server[28544]: Distributor caught fatal exception: Unable to launch gmysql connection: Unable to connect to database: Can’t connect to lo
Aug 24 00:30:51 sv.giaysihcm.com systemd[1]: pdns.service: main process exited, code=exited, status=1/FAILURE
Aug 24 00:30:51 sv.giaysihcm.com systemd[1]: Unit pdns.service entered failed state.
Aug 24 00:30:51 sv.giaysihcm.com systemd[1]: pdns.service failed.