This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Missing mysqld.sock
#1
[Not Solved] Missing mysqld.sock
I was working on a site yesterday and suddenly I was not able to bring anything up. The command to open the database returned this error message:
Connection failed: No such file or directory

service mysql status gives me this line:
Active: activating (start) since Thu 2025-06-26 15:57:15 EDT; 271ms ago
Not indicating Mysql is running

service mysql start and service mysql restart don't work.

mysql command returns this error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

ls -l /var/run/mysqld/mysqld.sock tells me this:
ls: cannot access '/var/run/mysqld/mysqld.sock': No such file or directory

Evidently /var/run/mysqld/mysqld.sock has suddenly disappeared, and I can't find it anywhere on the server!

find / -name mysqld.sock
find: â/proc/385863â: No such file or directory
find: â/proc/385869â: No such file or directory
find: â/proc/385870â: No such file or directory

I run another Sentora server that has the file but it won't let me copy it to my computer in order to transfer to the dead server.
srwxrwxrwx 1 mysql mysql 0 May 6 06:48 mysqld.sock

What a mess!! Any ideas on how to get it back?
Reply
Thanks given by:
#2
[Not Solved] RE: Missing mysqld.sock
(Yesterday, 06:15 AM)rsthomas Wrote: I was working on a site yesterday and suddenly I was not able to bring anything up.  The command to open the database returned this error message:
    Connection failed: No such file or directory

service mysql status gives me this line:
      Active: activating (start) since Thu 2025-06-26 15:57:15 EDT; 271ms ago
          Not indicating Mysql is running

service mysql start and service mysql restart don't work.

mysql command returns this error message:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

ls -l /var/run/mysqld/mysqld.sock tells me this:
    ls: cannot access '/var/run/mysqld/mysqld.sock': No such file or directory

Evidently /var/run/mysqld/mysqld.sock has suddenly disappeared, and I can't find it anywhere on the server!

find / -name mysqld.sock
    find: â/proc/385863â: No such file or directory
    find: â/proc/385869â: No such file or directory
    find: â/proc/385870â: No such file or directory

I run another Sentora server that has the file but it won't let me copy it to my computer in order to transfer to the dead server.
    srwxrwxrwx 1 mysql mysql 0 May  6 06:48 mysqld.sock

What a mess!!  Any ideas on how to get it back?

Basic question, but have you completely restarted the server?
This should re-create the missing file on startup.
If after a restart it doesn't work, try service mysql start and immediately check /var/log/syslog and /var/log/mysql/error.log for any mysql startup errors.

Info about the /var/run folder and files:
The files in /var/run (sym-linked to /run folder) are created at startup and holds operating system information and are technically 'not accessable' because they are used and run by the system.
Here is info on the /run and /var/run folders:
Quote:/run
This directory contains information which describes the system since it was booted. Once this purpose was served by /var/run and programs may continue to use it.
Quote:/var/run
Run-time variable files, like files holding process identifiers (PIDs) and logged user information (utmp). Files in this directory are usually cleared when the system boots.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#3
[Not Solved] RE: Missing mysqld.sock
Thanks for your input!

Restarting the server does nothing to help. The CPU activity is running at 60% and higher, which indicates to me that something is constantly trying to be processed -- probably Mysql.

The logs you suggested mean nothing to me, perhaps you understand them.

THANKS!


Attached Files
.docx   MysqlMess.docx (Size: 412.75 KB / Downloads: 0)
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 1 Guest(s)