• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

MySQL Service Stopped -- PleskFatalException

Y

YolaX

Guest
Hi,

We have recently started using a dedicated hosting account with paid set-up, but two weeks in we suddenly discovered that our MySQL service had stopped, and we have been unable to restart it.

The only problem we had up to this point was that we were told the server was on a 'bad segment' but the server support said they had fixed that, and they won't look into this problem as they say its software/system related.

So now, when we try to log into Plesk 9 64-bit (on CentOS 5) it brings up the following error:

ERROR: PleskFatalException
Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

0: /usr/local/psa/admin/plib/common_func.php3:108
psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)')
1: /usr/local/psa/admin/auto_prepend/auth.php3:93


I have tried logging into the server via SSH and running /etc/init.d/mysqld start but that also produces the error message:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

and running the alternative SSH command service mysqld start errors:

Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]


We checked the mysql config in my.cnf and it is still looking in the right location:
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock


We have tried checking the free space (plenty of room remaining) and the permissions and that all looks fine, although I suspect that wouldn't have suddenly changed.
The mysql directory in /var/lib/ -
drwxr-xr-x 34 mysql mysql 4096 Sep 5 22:27 mysql
The databases within /var/lib/mysql/ -
drwx------ 2 mysql mysql 4096 Sep 1 16:27 database1name
etc.

Yet each time the MySQL service fails to start it deletes the /var/lib/mysql/mysql.sock file.

When we check the error logs it just says:

[root@svr mysql]# tail -f /var/log/mysqld.log
thd=(nil) Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... frame pointer is NULL, did you compile with -fomit-frame-pointer? Aborting backtrace!


We are really at a loss as to what has happened with the server and how to repair the fault.

Can anyone assist us with this technical issue please?
 
Last edited by a moderator:
MySQL Failed /var/lib/mysql/mysql.sock

I am having exactly the same problem. Did you ever find a solution?

I updated PHP on a Godaddy Virtual Server to version 5.2 through a tutorial on jason litka's website. After I completed the yum update php. My paralles admin was broken. When I try to start MySQL in SSH it says FAILED. Has anyone had this problem?

Shane
 
Yes, if your actions updated mysql to 5.1, you need to make sure you choose yes to updating the my.cnf as mysql 5.1 will not start with a mysql 5 conf file.

There is likely an my.cnf.rpmsave that you can use to overwrite your existing one.
 
Back
Top