Hello,
I was playing around with docker, and suddenly, I got a 500 error on accessing my CyberPanel.
I have Ubuntu 20.04.4 LTS
When trying to access the panel, I see 500 error.
So I did nano /usr/local/CyberCP/CyberCP/settings.py
and enabled debug True.
Then I did systemctl restart lscpd
and now I see following error:
Exception Value: (2002, “Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”)
I tried sudo service mysql start
but I get
Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xe” for details.
So I did systemctl status mariadb.service
and now I get :
mariadb.service: Main process exited, code=exited, status=1/FAILURE
mariadb.service: Failed with result ‘exit-code’.
Failed to start MariaDB 10.3.34 database server.
If I do df
, no file system is above 50% usage.
If I do sudo journalctl -xe
, I see :
pdns.service: Main process exited, code=exited, status=1/FAILURE
pdns.service: Failed with result ‘exit-code’.
I removed all docker containers with docker rm $(docker ps -aq)
If i try mysqladmin -u root -p status
, it gives me :
error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’
Check that mysqld is running and that the socket: ‘/var/run/mysqld/mysqld.sock’ exists!
By the way, even doing an upgrade of Cyberpanel gives me same above error at the end.
I used this command to try to upgrade:
sudo su - -c "sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)"
If I do netstat -lnp | grep 8090
, I see
tcp 0 0 0.0.0.0:8090 0.0.0.0:* LISTEN 20314/lscpd (lscpd
If i do sudo find / -type s
, I don’t see any result with mysql* sock… (not sure if normal?)
I did ls -ld /var/lib/mysql
, which gave me:
drwxrwxrwx 5 docker docker 4096 Jun 10 11:20 /var/lib/mysql
So now I am not sure to what should I change that, because I don’t think it should be “docker”!
I tried root:root and mysql:mysql, but didnt solve it…
If i do sudo systemctl enable mysql
, I get
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: Refusing to operate on alias name or linked unit file: mysql.service
I tried sudo reboot
, but still the same.
So I have no idea what to do now, nor how/why it happened.
Can anyone please help ?