MySQL connect ERROR: No such file or directory

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

MySQL connect ERROR: No such file or directory

Postby dinstar » Wed Sep 21, 2022 8:23 am

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.
ViciBox v.10.0.0 210901 iso installation
Asterisk 13.38.2-vici
OpenSuse Lead 15.2
Dinstar GSM Gateway 16 Ports
dinstar
 
Posts: 49
Joined: Wed Nov 10, 2021 3:18 pm

Re: MySQL connect ERROR: No such file or directory

Postby dinstar » Wed Sep 21, 2022 8:35 am

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
ViciBox v.10.0.0 210901 iso installation
Asterisk 13.38.2-vici
OpenSuse Lead 15.2
Dinstar GSM Gateway 16 Ports
dinstar
 
Posts: 49
Joined: Wed Nov 10, 2021 3:18 pm

Re: MySQL connect ERROR: No such file or directory

Postby GenXOutsourcing » Wed Sep 21, 2022 2:39 pm

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
Built too many to count, Centos7 Scratch install, Opensuse Scratch install, Centos8 Scratch install, etc.
Dual 8 core/32gb RAM/500gb SSDs
SVN Version:3440
VERSION: 2.14-812a
genxoutsourcing.com
GenXOutsourcing
 
Posts: 120
Joined: Sun Sep 22, 2019 12:53 am

Re: MySQL connect ERROR: No such file or directory

Postby dinstar » Thu Sep 22, 2022 11:10 am

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!
ViciBox v.10.0.0 210901 iso installation
Asterisk 13.38.2-vici
OpenSuse Lead 15.2
Dinstar GSM Gateway 16 Ports
dinstar
 
Posts: 49
Joined: Wed Nov 10, 2021 3:18 pm


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 132 guests