Page 1 of 1

MySQL connect ERROR: No such file or directory

PostPosted: Wed Sep 21, 2022 8:23 am
by dinstar
Hello Everybody! Hope you all are well!

I would like to have your assistance in the following error I am facing for the 3rd time. I have to re-install the iso everytime it happens. It shows the following when I try to accesss the web page "MySQL connect ERROR: No such file or directory". Today I noticed, suddenly my server's apache stopped working; i.e. was not able to access webpage. I check only two socket were running using screen -ls. I restarted the server but then MYSQL error poped up in webpage.

This is happening for the 3rd time, and this time I would like to pursue some good solution without re-installing the iso. Pls assist.

Re: MySQL connect ERROR: No such file or directory

PostPosted: Wed Sep 21, 2022 8:35 am
by dinstar
Running "/usr/share/astguiclient/ADMIN_keepalive_ALL.pl"

Gives Following:

DBI connect('asterisk:localhost:3306','cron',...) failed: Can't connect to local MySQL server through socket '/run/mysql/mysql.sock' (2) at /usr/share/astguiclient/ADMIN_keepalive_ALL.pl line 451.
Couldn't connect to database: Can't connect to local MySQL server through socket '/run/mysql/mysql.sock' (2) at /usr/share/astguiclient/ADMIN_keepalive_ALL.pl line 451.


running htop shows that ./kswapd is using 99% of CPU
Load Average is 3.00, I have 4 Core i5 CPU.

I also checked crontab entries and saw that they are missing.


Tried starting mysql, but faced the following:

vicibox10:~ # systemctl status mysql
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2022-09-21 21:19:12 IST; 1min 58s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 16176 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=203/EXEC)

Sep 21 21:19:12 vicibox10 systemd[1]: Starting MariaDB database server...
Sep 21 21:19:12 vicibox10 systemd[16176]: mariadb.service: Failed to execute command: Permission denied
Sep 21 21:19:12 vicibox10 systemd[16176]: mariadb.service: Failed at step EXEC spawning /usr/lib/mysql/mysql-systemd-helper: Permission denied
Sep 21 21:19:12 vicibox10 systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
Sep 21 21:19:12 vicibox10 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Sep 21 21:19:12 vicibox10 systemd[1]: Failed to start MariaDB database server.
vicibox10:~ # systemctl start mysql
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
vicibox10:~ # ^C

Re: MySQL connect ERROR: No such file or directory

PostPosted: Wed Sep 21, 2022 2:39 pm
by GenXOutsourcing
check your crontab (crontab -e). I bet its been emptied and replaced by MALWARE

someone gained access to SSH and even added their server IPs to the trusted hosts. AND i am sure they added a script that shuts down your firewall, and replaces any files that you delete. YES I HAVE HAD THIS HAPPEN TO A FEW PEOPLE

So....... REINSTALL, and LOCK DOWN ACCESS

Re: MySQL connect ERROR: No such file or directory

PostPosted: Thu Sep 22, 2022 11:10 am
by dinstar
Woah! I have reinstalled it. Also, I have a static public ip, and have ZTE F660 router. Will removing port forwarding from router settings be enough to block attempts? Also, my router login page is shown when I try to access my public ip, to disable it I have forwarded 111.111.111.111 LAN ip, which doesn't exists to port from 1 - 65535, hope this will help.

Thanks buddy!