• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved ERROR: PleskFatalException

fmoitie

New Pleskian
Hi all.

i have this 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: common_func.php3:146
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: auth.php3:94


restart mysqld don't work.

# /etc/init.d/mysqld status
mysqld is stopped
# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]


have you an idea for this issue ?

Thanks in advance
Regards
Frédéric
 
Hi Ivalics.

thanks for your reply.

i have no file xxx.err

[root@cmail mysql]# cd /var/lib/mysql/
[root@cmail mysql]# ls -la
total 414232
drwxr-xr-x 12 mysql mysql 4096 Jul 14 07:28 .
drwxr-xr-x 30 root root 4096 Jul 16 2012 ..
-rw------- 1 mysql mysql 13 Jul 5 2008 .bash_history
drwx------ 2 mysql mysql 4096 May 11 2009 4psacserver
drwx------ 2 mysql mysql 4096 Dec 11 2012 4psasguardian
drwx------ 2 mysql mysql 24576 May 10 2009 atmail
drwx------ 2 mysql mysql 36864 May 10 2009 billing
drwx------ 2 mysql mysql 4096 Aug 18 2011 horde
-rw-rw---- 1 mysql mysql 5242880 Jul 14 07:27 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jul 14 07:27 ib_logfile1
-rw-rw---- 1 mysql mysql 413138944 Jul 14 07:27 ibdata1
drwx------ 2 mysql mysql 4096 Nov 1 2012 mysql
drwx------ 2 mysql mysql 4096 May 9 2009 phpmyadmin_DGHGOzRKaZHa
drwx------ 2 mysql mysql 4096 May 9 2009 phpmyadmin_djaFYvpaH7qA
drwx------ 2 mysql mysql 4096 Mar 10 2008 phpmyadmin_hao89q2706Q9
drwx------ 2 mysql mysql 12288 Nov 1 2012 psa


Regards
 
What about something useful from /var/log/mysqld.log ?
 
Hi Igor

last entry in /var/log/mysqld.log

151231 07:38:11 mysqld started
151231 7:38:11 [Warning] option 'innodb_additional_mem_pool_size': signed value 512000 adjusted to 524288
151231 7:38:11 InnoDB: Started; log sequence number 25 1489300569
151231 7:38:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
160426 10:09:18 mysqld started
160426 10:09:18 [Warning] option 'innodb_additional_mem_pool_size': signed value 512000 adjusted to 524288
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
160426 10:09:19 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
160426 10:09:28 InnoDB: Started; log sequence number 25 3412290399
160426 10:09:28 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
160427 09:06:08 mysqld started
160427 9:06:08 [Warning] option 'innodb_additional_mem_pool_size': signed value 512000 adjusted to 524288
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
160427 9:06:09 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
160427 9:06:20 InnoDB: Started; log sequence number 25 3412536474
160427 9:06:21 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

Number of processes running now: 0
160714 07:28:09 mysqld restarted
nohup: cannot run command `/usr/libexec/mysqld': No such file or directory
160714 07:28:09 mysqld ended


Regards
 
nohup: cannot run command `/usr/libexec/mysqld': No such file or directory
Do you have this file? It is part of mysql-server package:

# ll /usr/libexec/mysqld
-rwxr-xr-x 1 root root 7559464 May 11 12:05 /usr/libexec/mysqld

# rpm -qf /usr/libexec/mysqld
mysql-server-5.1.73-7.el6.i686
 
Also if InnoDB files are corrupted you can do some things like.
1. Copy the whole /var/lib/mysql folder to a safe place (as a backup)
2. Because you have only a few DB and seems a new server to me, try to find in PLESK folder a dump of an installer/upgrader, /var/lib/psa/dump you can try to restore from here the new one and hope will work.
3. If that fail, you can try to start in debug mode the MySQL and repair InnoDB, low chance.
4. Reinstall MySQL and then the dump from PSA. You can lose some data.

All this is an untraditional method, don't try at home :) @IgorG comment it if I made some mistake.
 
I just want to notice, that there were some kind of Plesk KB articles about fixing corrupted InnoDB.
 
# ll /usr/libexec/mysqld
ls: /usr/libexec/mysqld: No such file or directory

# rpm -qf /usr/libexec/mysqld
mysql-server-5.0.95-1.el5_7.1
 
which package ?
mysql-server ?

how i can re-install this ?
just with apt-get install mysql-server ?

i am novice on linux
 
As far as I see you have CentOS5 server? Therefore you should use rpm package manager instead of apt-get which should be used on Debian or Ubuntu.
I don't know what is your platform - 32 or 64bit. If you have 64bit, download package from mysql-server-5.0.95-1.el5_7.1.x86_64.rpm for example. Then reinstall it with

# rpm -Uvh --force --nodeps mysql-server-5.0.95-1.el5_7.1.x86_64.rpm
 
first, thanks for your reply and help.

so, yes is centos5

i have download & re-install package, but failed again for starting mysqld


# uname -a
Linux cmail.xxxxx 2.6.18-028stab053.10-PAE #1 SMP Thu Feb 28 19:54:09 MSK 2008 i686 i686 i386 GNU/Linux
#
# wget http://vault.centos.org/5.7/updates/x86_64/RPMS/mysql-server-5.0.95-1.el5_7.1.x86_64.rpm
--2016-07-20 09:50:00-- http://vault.centos.org/5.7/updates/x86_64/RPMS/mysql-server-5.0.95-1.el5_7.1.x86_64.rpm
Resolving vault.centos.org... 88.208.217.170, 2a00:f10:10b:13::10
Connecting to vault.centos.org|88.208.217.170|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10348368 (9.9M) [application/x-rpm]
Saving to: `mysql-server-5.0.95-1.el5_7.1.x86_64.rpm.1'

100%[===================================================================================================================================================================================================>] 10,348,368 10.4M/s in 0.9s

2016-07-20 09:50:01 (10.4 MB/s) - `mysql-server-5.0.95-1.el5_7.1.x86_64.rpm.1' saved [10348368/10348368]

#
# rpm -Uvh --force --nodeps mysql-server-5.0.95-1.el5_7.1.x86_64.rpm
Preparing... ########################################### [100%]
package mysql-server-5.0.95-1.el5_7.1.x86_64 is intended for a x86_64 architecture
#
# ll /usr/libexec/mysqld
ls: /usr/libexec/mysqld: No such file or directory
#
# rpm -qf /usr/libexec/mysqld
mysql-server-5.0.95-1.el5_7.1
#
# rpm -Va mysql-server
missing /usr/libexec/mysqld
#
# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
#
 
# uname -a
Linux cmail.xxxxx 2.6.18-028stab053.10-PAE #1 SMP Thu Feb 28 19:54:09 MSK 2008 i686 i686 i386 GNU/Linux
 
You have 32bit platform and tried to install 64bit package. Find and install appropriate mysql-server package.
 
Back
Top