• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

Issue DB query failed: SQLSTATE[HY000] [2002] Connection refused

HammyHavoc

New Pleskian
Hi all,

I randomly had my Plesk server stop functioning whilst I was trying to go to sleep, had hours of downtime due to this, and the tiredness has really begun to kick in.

All of the sites are currently down, and going to the Plesk admin area gives me this error:

Code:
Server Error
500 Plesk\Exception\Database

DB query failed: SQLSTATE[HY000] [2002] Connection refused
Type    Plesk\Exception\Database
Message    DB query failed: SQLSTATE[HY000] [2002] Connection refused
File    Mysql.php
Line    79

Running
Code:
systemctl status mysql.service -l
gives me this:

Code:
Jan 05 10:29:49 mydomaincensored.com mysql[32291]: Starting MariaDB.220105 10:29:49 mysqld_safe unknown option '--innodb_buffer_pool_size=2M'
Jan 05 10:29:49 mydomaincensored.com mysql[32291]: 220105 10:29:49 mysqld_safe unknown option '--innodb_additional_mem_pool_size=500K'
Jan 05 10:29:49 mydomaincensored.com mysql[32291]: 220105 10:29:49 mysqld_safe unknown option '--innodb_log_buffer_size=500K'
Jan 05 10:29:49 mydomaincensored.com mysql[32291]: 220105 10:29:49 mysqld_safe unknown option '--innodb_thread_concurrency=2'
Jan 05 10:29:49 mydomaincensored.com mysql[32291]: 220105 10:29:49 mysqld_safe Logging to '/var/lib/mysql/mydomaincensored.com.err'.
Jan 05 10:29:49 mydomaincensored.com mysql[32291]: 220105 10:29:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jan 05 10:29:50 mydomaincensored mysql[32291]: /etc/rc.d/init.d/mysql: line 263: kill: (32437) - No such process
Jan 05 10:29:50 mydomaincensored mysql[32291]: ERROR!

Running
Code:
systemctl status mariadb -l
gives me this:

Code:
mariadb.service - MariaDB 10.2.41 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Wed 2022-01-05 10:32:16 GMT; 2s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 9145 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --basedir=/usr $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 9045 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 8776 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 9145 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Jan 05 10:32:15 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:15 139947168180416 [Note] InnoDB: Highest supported file format is Barracuda.
Jan 05 10:32:15 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:15 139947168180416 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1016575594673
Jan 05 10:32:15 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:15 139947168180416 [ERROR] InnoDB: Missing MLOG_CHECKPOINT at 1016575594673 between the checkpoint 1016575594673 and the end 1016575601614.
Jan 05 10:32:15 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:15 139947168180416 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
Jan 05 10:32:16 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:16 139947168180416 [Note] InnoDB: Starting shutdown...
Jan 05 10:32:16 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:16 139947168180416 [ERROR] Plugin 'InnoDB' init function returned error.
Jan 05 10:32:16 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:16 139947168180416 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan 05 10:32:16 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:16 139947168180416 [Note] Plugin 'FEEDBACK' is disabled.
Jan 05 10:32:16 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:16 139947168180416 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan 05 10:32:16 mydomaincensored.com mysqld[9145]: 2022-01-05 10:32:16 139947168180416 [ERROR] Aborting

Running
Code:
df -h
gives me this:

Code:
Filesystem         Size  Used Avail Use% Mounted on
/dev/ploop10935p1   50G   42G  5.9G  88% /
/dev/simfs          50G   42G  5.9G  88% /tmp
/dev/simfs          50G   42G  5.9G  88% /var/tmp
devtmpfs           2.0G     0  2.0G   0% /dev
tmpfs              2.0G     0  2.0G   0% /dev/shm
tmpfs              2.0G   86M  2.0G   5% /run
tmpfs              2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs              410M     0  410M   0% /run/user/0

Any ideas? Would be hugely appreciative of it.
 
Running
Code:
plesk installer --select-release-current --reinstall-patch --upgrade-installed-components
gives me this:

Code:
WARNING: Ignored deprecated parameter in Plesk Installer's configuration file: 'SOURCE_TYPE' = 'network'
WARNING: Ignored deprecated parameter in Plesk Installer's configuration file: 'USE_YUM' = 'YES'
WARNING: Command line option '--reinstall-patch' is deprecated and will be ignored.
Downloading file products.inf3: 0%
Downloading file products.inf3: 100% was finished.
Downloading file pool/PSA_18.0.40_7765/release.inf3: 0%
Downloading file pool/PSA_18.0.40_7765/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.39_7558/release.inf3: 0%
Downloading file pool/PSA_18.0.39_7558/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.38_7167/release.inf3: 0%
Downloading file pool/PSA_18.0.38_7167/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.37_6686/release.inf3: 0%
Downloading file pool/PSA_18.0.37_6686/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.36_6324/release.inf3: 0%
Downloading file pool/PSA_18.0.36_6324/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.35_6216/release.inf3: 0%
Downloading file pool/PSA_18.0.35_6216/release.inf3: 100% was finished.
Downloading file pool/PSA_18.0.34_5691/release.inf3: 0%
Downloading file pool/PSA_18.0.34_5691/release.inf3: 100% was finished.
Downloading file plesk.inf3: 0%
Downloading file plesk.inf3: 100% was finished.
Downloading file ppsmbe.inf3: 0%
Downloading file ppsmbe.inf3: 100% was finished.
Downloading file sitebuilder.inf3: 0%
Downloading file sitebuilder.inf3: 100% was finished.
Downloading file sso.inf3: 0%
Downloading file sso.inf3: 100% was finished.
Downloading file PHP80_17/release.inf3: 0%
Downloading file PHP80_17/release.inf3: 100% was finished.
Downloading file php80.inf3: 0%
Downloading file php80.inf3: 100% was finished.
Downloading file php72.inf3: 0%
Downloading file php72.inf3: 100% was finished.
Downloading file PHP74_17/release.inf3: 0%
Downloading file PHP74_17/release.inf3: 100% was finished.
Downloading file php74.inf3: 0%
Downloading file php74.inf3: 100% was finished.
Downloading file PHP73_17/release.inf3: 0%
Downloading file PHP73_17/release.inf3: 100% was finished.
Downloading file php73.inf3: 0%
Downloading file php73.inf3: 100% was finished.
Downloading file php71.inf3: 0%
Downloading file php71.inf3: 100% was finished.
Downloading file setemplates.inf3: 0%
Downloading file setemplates.inf3: 100% was finished.
Downloading file pp-sitebuilder.inf3: 0%
Downloading file pp-sitebuilder.inf3: 100% was finished.
Downloading file billing.inf3: 0%
Downloading file billing.inf3: 100% was finished.
Downloading file mysql.inf3: 0%
Downloading file mysql.inf3: 100% was finished.
Downloading file apache.inf3: 0%
Downloading file apache.inf3: 100% was finished.
Downloading file nginx.inf3: 0%
Downloading file nginx.inf3: 100% was finished.
Downloading file php70.inf3: 0%
Downloading file php70.inf3: 100% was finished.
Downloading file php56.inf3: 0%
Downloading file php56.inf3: 100% was finished.
Downloading file php55.inf3: 0%
Downloading file php55.inf3: 100% was finished.
Downloading file php54.inf3: 0%
Downloading file php54.inf3: 100% was finished.
Downloading file php53.inf3: 0%
Downloading file php53.inf3: 100% was finished.
Downloading file php52.inf3: 0%
Downloading file php52.inf3: 100% was finished.
Downloading file pmm.inf3: 0%
Downloading file pmm.inf3: 100% was finished.
Checking for installed packages...
Downloading file pool/PSA_18.0.40_7765/plesk-18.0.40-cos7-x86_64.inf3: 0%
Downloading file pool/PSA_18.0.40_7765/plesk-18.0.40-cos7-x86_64.inf3: 100% was finished.
Downloading file PHP52_17/php52-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP52_17/php52-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP53_17/php53-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP53_17/php53-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP54_17/php54-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP54_17/php54-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP55_17/php55-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP55_17/php55-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP56_17/php56-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP56_17/php56-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file PHP70_17/php70-cos7-x86_64.plesk17.inf3: 0%
Downloading file PHP70_17/php70-cos7-x86_64.plesk17.inf3: 100% was finished.
Downloading file pool/PHP_7.1.33_98/php71-cos7-x86_64.inf3: 0%
Downloading file pool/PHP_7.1.33_98/php71-cos7-x86_64.inf3: 100% was finished.
Downloading file pool/PHP_7.2.34_151/php72-cos7-x86_64.inf3: 0%
Downloading file pool/PHP_7.2.34_151/php72-cos7-x86_64.inf3: 100% was finished.
Downloading file PHP73_17/php73-cos7-x86_64.inf3: 0%
Downloading file PHP73_17/php73-cos7-x86_64.inf3: 100% was finished.
Downloading file PHP74_17/php74-cos7-x86_64.inf3: 0%
Downloading file PHP74_17/php74-cos7-x86_64.inf3: 100% was finished.
Downloading file PHP80_17/php80-cos7-x86_64.inf3: 0%
Downloading file PHP80_17/php80-cos7-x86_64.inf3: 100% was finished.
Downloading file SITEBUILDER_18.0.29/sitebuilder-18.0.29-rhall-all.inf3: 0%
Downloading file SITEBUILDER_18.0.29/sitebuilder-18.0.29-rhall-all.inf3: 100% was finished.
gpg-pubkey-0129f5f3-5d90a79d gpg(Panopta Support <[email protected]>)
gpg-pubkey-b56a8bac-3bbc4d06 gpg(city-fan.org software librarian <[email protected]>)
gpg-pubkey-8997217a-59cd0633 gpg(Panopta Support <[email protected]>)
gpg-pubkey-cdef74bb-53a89131 gpg(KernelCare <[email protected]>)
gpg-pubkey-5ebd2744-418ffac9 gpg(Atomic Rocket Turtle <[email protected]>)
gpg-pubkey-352c64e5-52ae6884 gpg(Fedora EPEL (7) <[email protected]>)
gpg-pubkey-914bdf7e-55c05220 gpg(Plesk Team <[email protected]>)
gpg-pubkey-1bb943db-511147a9 gpg(MariaDB Package Signing Key <[email protected]>)
gpg-pubkey-4132004c-602e855e gpg(KernelCare <[email protected]>)
gpg-pubkey-4520afa9-50ab914c gpg(Atomicorp (Atomicorp Official Signing Key) <[email protected]>)
gpg-pubkey-404d2e7a-55709ddb gpg(DataGrid <[email protected]>)
gpg-pubkey-f4a80eb5-53a7ff4b gpg(CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>)
gpg-pubkey-8508ad86-5787fd00 gpg(DataGrid (No sub-key) <[email protected]>)
DB query failed: SQLSTATE[HY000] [2002] Connection refused

Loaded plugins: fastestmirror
Detecting installed product components.
gpg-pubkey-0129f5f3-5d90a79d gpg(Panopta Support <[email protected]>)
gpg-pubkey-b56a8bac-3bbc4d06 gpg(city-fan.org software librarian <[email protected]>)
gpg-pubkey-8997217a-59cd0633 gpg(Panopta Support <[email protected]>)
gpg-pubkey-cdef74bb-53a89131 gpg(KernelCare <[email protected]>)
gpg-pubkey-5ebd2744-418ffac9 gpg(Atomic Rocket Turtle <[email protected]>)
gpg-pubkey-914bdf7e-55c05220 gpg(Plesk Team <[email protected]>)
gpg-pubkey-352c64e5-52ae6884 gpg(Fedora EPEL (7) <[email protected]>)
gpg-pubkey-1bb943db-511147a9 gpg(MariaDB Package Signing Key <[email protected]>)
gpg-pubkey-4132004c-602e855e gpg(KernelCare <[email protected]>)
gpg-pubkey-4520afa9-50ab914c gpg(Atomicorp (Atomicorp Official Signing Key) <[email protected]>)
gpg-pubkey-404d2e7a-55709ddb gpg(DataGrid <[email protected]>)
gpg-pubkey-f4a80eb5-53a7ff4b gpg(CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>)
gpg-pubkey-8508ad86-5787fd00 gpg(DataGrid (No sub-key) <[email protected]>)
Retrieving information about the installed license key...
Loaded plugins: fastestmirror
You already have the latest version of product(s) and all the selected components installed. Installation will not continue.
 
I've tried rebooting repeatedly after trying various things, and I've also tried
Code:
service mysql stop
service mysql start

This is the my.cnf:

Code:
[client]
port        = 3306
socket        = /var/lib/mysql/mysql.sock


[mysqld_safe]
innodb_buffer_pool_size=2M
innodb_additional_mem_pool_size=500K
innodb_log_buffer_size=500K
innodb_thread_concurrency=2

[mysqld]
local-infile=0
datadir=/var/lib/mysql
user=mysql
symbolic-links=0

max_connections = 200
wait_timeout = 60
query-cache-type = 1
query-cache-size = 16M
query_cache_limit = 2M
thread_cache_size = 16
tmp_table_size = 32M
max_heap_table_size = 32M
join_buffer_size = 2M
table_open_cache = 128

port        = 3306
socket        = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M







innodb_buffer_pool_size = 16M
innodb_log_buffer_size = 8M

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
 
Running
Code:
df -i
gives this:

Code:
Filesystem         Inodes   IUsed   IFree IUse% Mounted on
/dev/ploop10935p1 6381568 1384642 4996926   22% /
/dev/simfs        6381568 1384642 4996926   22% /tmp
/dev/simfs        6381568 1384642 4996926   22% /var/tmp
devtmpfs           524288      78  524210    1% /dev
tmpfs              524288       1  524287    1% /dev/shm
tmpfs              524288     207  524081    1% /run
tmpfs              524288      10  524278    1% /sys/fs/cgroup
tmpfs              524288       1  524287    1% /run/user/0
tmpfs              524288       1  524287    1% /run/user/989
 
I've run

Code:
rm /var/lib/mysql/ib_logfile*

the server appears to be back up. Not sure if I've lost data as a result, or if it'll happen again.
 
Looks like I spoke too soon:


gives this error:

Code:
500 Plesk\Exception\Database

 

DB query failed: SQLSTATE[HY000] [2002] Connection refused

Type     Plesk\Exception\Database

Message DB query failed: SQLSTATE[HY000] [2002] Connection refused

File     Mysql.php

Line     79

and


gives

Code:
Server Error

500 Zend_Db_Adapter_Exception

 

SQLSTATE[HY000] [2002] Connection refused

Type     Zend_Db_Adapter_Exception

Message SQLSTATE[HY000] [2002] Connection refused

File     Abstract.php

Line     144

I ran
Code:
cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
prior to
Code:
rm /var/lib/mysql/ib_logfile*
 
Is restoring the `/var/lib/mysql/` directory to how it was as simple as just replacing with the contents of `/var/lib/mysql_backup`? Can't seem to find any info on that. Can find mentions of it throughout Plesk documentation to do it for "security", but not what to after that point.
 
First of all, it's not a plesk problem. The problem is more related to mariadb.
Deleting the ib_logfiles does not resolve in any data loss, its just a logfile, as the name said.
All mysql data is stored in /var/lib/mysql/, but to be sure you should do also an mysqldump.

So, please run the following commands and paste the outputs:
Code:
systemctl restart mariadb
If there is any error, please show the error using
Code:
journalctl -xe -u mariadb
 
Thanks for your response, really appreciative of it.

I get an error, and the output is as follows:

Code:
journalctl -xe -u mariadb
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [Note] InnoDB: Highest supported file format is Barracuda.
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1016575877689
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [ERROR] InnoDB: ############### CORRUPT LOG RECORD FOUND ##################
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [Note] InnoDB: Log record type 1, page 16:2. Log parsing proceeded successfully up to
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [Note] InnoDB: Hex dump starting 0 bytes before and ending 100 bytes after the corrupt
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: len 100; hex 81100200b5e6006881101f9400b5e6000e0b00c1c0f40800000000000f70a308c0df0303003800000f70a326c0df0380f600060001800
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [Note] InnoDB: Set innodb_force_recovery to ignore this error.
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [Warning] InnoDB: Log scan aborted at LSN 1016575877632
Jan 05 12:16:30 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:30 139757512132800 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
Jan 05 12:16:31 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:31 139757512132800 [Note] InnoDB: Starting shutdown...
Jan 05 12:16:31 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:31 139757512132800 [ERROR] Plugin 'InnoDB' init function returned error.
Jan 05 12:16:31 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:31 139757512132800 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan 05 12:16:31 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:31 139757512132800 [Note] Plugin 'FEEDBACK' is disabled.
Jan 05 12:16:31 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:31 139757512132800 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan 05 12:16:31 mydomaincensored.com mysqld[4844]: 2022-01-05 12:16:31 139757512132800 [ERROR] Aborting
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] /usr/sbin/mysqld (mysqld 10.2.41-MariaDB) starting as process 7333 ...
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Uses event mutexes
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Compressed tables use zlib 1.2.7
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Using Linux native AIO
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Number of pools: 1
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Using SSE2 crc32 instructions
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size =
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Completed initialization of buffer pool
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140391833622272 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priorit
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Highest supported file format is Barracuda.
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1016575877689
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [ERROR] InnoDB: ############### CORRUPT LOG RECORD FOUND ##################
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Log record type 1, page 16:2. Log parsing proceeded successfully up to
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Hex dump starting 0 bytes before and ending 100 bytes after the corrupt
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: len 100; hex 81100200b5e6006881101f9400b5e6000e0b00c1c0f40800000000000f70a308c0df0303003800000f70a326c0df0380f600060001800
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Note] InnoDB: Set innodb_force_recovery to ignore this error.
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [Warning] InnoDB: Log scan aborted at LSN 1016575877632
Jan 05 12:50:02 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:02 140392176269504 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
Jan 05 12:50:03 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:03 140392176269504 [Note] InnoDB: Starting shutdown...
Jan 05 12:50:03 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:03 140392176269504 [ERROR] Plugin 'InnoDB' init function returned error.
Jan 05 12:50:03 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:03 140392176269504 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan 05 12:50:03 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:03 140392176269504 [Note] Plugin 'FEEDBACK' is disabled.
Jan 05 12:50:03 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:03 140392176269504 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan 05 12:50:03 mydomaincensored.com mysqld[7333]: 2022-01-05 12:50:03 140392176269504 [ERROR] Aborting
lines 460-499/499 (END)

In the my.cnf, if I then set

Code:
innodb_force_recovery = 6

I get plenty of `Failed to find tablespace` errors if I then repeat the command, including these, amidst some vhost WordPress related ones, which I've omitted:

Code:
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:22 139668577196224 [Note] Plugin 'FEEDBACK' is disabled.
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:22 139668577196224 [Note] Server socket created on IP: '::'.
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:22 139668577187584 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`gtid_slave_pos` in the ca
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:22 139668577187584 [Warning] InnoDB: Allocated tablespace ID 3 for mysql/gtid_slave_pos, old maximum was
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:22 139668577196224 [Note] Reading of all Master_info entries succeeded
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:22 139668577196224 [Note] Added new Master_info '' to hash table
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:22 139668577196224 [Note] /usr/sbin/mysqld: ready for connections.
Jan 05 12:55:22 mydomaincensored.com mysqld[7861]: Version: '10.2.41-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
Jan 05 12:55:55 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:55 139668576880384 [ERROR] InnoDB: Failed to find tablespace for table `psa`.`hosting` in the cache. Atte
Jan 05 12:55:55 mydomaincensored.com mysqld[7861]: 2022-01-05 12:55:55 139668576880384 [ERROR] InnoDB: Failed to find tablespace for table `psa`.`domains` in the cache. Atte
Jan 05 12:56:02 mydomaincensored.com mysqld[7861]: 2022-01-05 12:56:02 139668575958784 [Warning] Aborted connection 18 to db: 'psa' user: 'admin' host: 'localhost' (Got an e
 
Ouh, seems like your table spaces are corrupted.
You could try to recreate the tablespaces and tables, but it will be a bunch of work as you need to do it for every single table in your database...
 
My hosting provider told me that InnoDB was corrupt, so they've restored from a snapshot. Thanks for your help though, really appreciate it, it helped me not to stress out so much. Wishing you and yours health and happiness throughout 2022 and beyond!
 
Hi all,
same issue of other user, but I can't find a solution

Code:
Product version: Plesk Obsidian 18.0.40.3
OS version: Debian 9.13 x86_64
Build date: 2022/01/16 00:00
Revision: b3f50e0b4df16778c2131cc55cb1b14d2c71a62a

Code:
Server Error
500 Plesk\Exception\Database

DB query failed: SQLSTATE[HY000] [2002] Connection refused
Type    Plesk\Exception\Database
Message    DB query failed: SQLSTATE[HY000] [2002] Connection refused
File    Mysql.php
Line    79

I've open mysqldump.log
Code:
 Trying to start service mariadb... failed
Jan 19 06:25:01 apparire.it systemd[1]: Starting MariaDB 10.1.45 database server...
Jan 19 06:25:01 apparire.it mysqld[186368]: 2022-01-19  6:25:01 139883126521216 [Note] /usr/sbin/mysqld (mysqld 10.1.45-MariaDB-0+deb9u1) starting as process 186368 ...
Jan 19 06:25:01 apparire.it mysqld[186368]: 2022-01-19  6:25:01 139883126521216 [Warning] Can't create test file /var/lib/mysql/apparire.lower-test
Jan 19 06:25:01 apparire.it mysqld[186368]: [97B blob data]
Jan 19 06:25:01 apparire.it systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 19 06:25:01 apparire.it systemd[1]: Failed to start MariaDB 10.1.45 database server.
Jan 19 06:25:01 apparire.it systemd[1]: mariadb.service: Unit entered failed state.
Jan 19 06:25:01 apparire.it systemd[1]: mariadb.service: Failed with result 'exit-code'.

*****  problem report *****
Warning: start service mariadb failed

 Trying to establish test connection... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
failed
ERROR while trying to establish test connection
STOP mysqldump.sh

mysqld.sock missing in directory /var/run/mysqld/

/var/log# ls
Code:
alternatives.log    daemon.log.4.gz  fail2ban.log    kern.log.4.gz        maillog.processed.2.gz    passenger-analytics  syslog.3.gz
alternatives.log.1  debug         fail2ban.log.1.gz    lastlog            maillog.processed.3.gz    php7.0-fpm.log         syslog.4.gz
apache2            debug.1         fail2ban.log.2.gz    mail.err        mail.warn        php7.0-fpm.log.1     syslog.5.gz
apt            debug.2.gz         fail2ban.log.3.gz    mail.err.1        mail.warn.1        plesk             syslog.6.gz
auth.log        debug.3.gz         fail2ban.log.4.gz    mail.err.2.gz        mail.warn.2.gz        plesk-php72-fpm      syslog.7.gz
auth.log.1        debug.4.gz         fail2ban.log.5.gz    mail.err.3.gz        mail.warn.3.gz        plesk-php73-fpm      user.log
auth.log.2.gz        dpkg.log         fail2ban.log.6.gz    mail.err.4.gz        mail.warn.4.gz        plesk-php74-fpm      user.log.1
auth.log.3.gz        dpkg.log.1         fail2ban.log.7.gz    mail.info        mariadb            plesk-php80-fpm      user.log.2.gz
auth.log.4.gz        dpkg.log.2.gz    faillog        mail.info.1        messages        rkhunter.log         user.log.3.gz
btmp            dpkg.log.3.gz    fontconfig.log    mail.info.2.gz        messages.1        rkhunter.log.old     user.log.4.gz
btmp.1            dpkg.log.4.gz    installer        mail.info.3.gz        messages.2.gz        samba             wtmp
daemon.log        dpkg.log.5.gz    kern.log        mail.info.4.gz        messages.3.gz        sw-cp-server         wtmp.1
daemon.log.1        dpkg.log.6.gz    kern.log.1        maillog            messages.4.gz        syslog
daemon.log.2.gz     dpkg.log.7.gz    kern.log.2.gz    maillog.processed    mysql            syslog.1
daemon.log.3.gz     dpkg.log.8.gz    kern.log.3.gz    maillog.processed.1.gz    nginx            syslog.2.gz

thanks in advance for the support!
 
Hi, please show the output of the following commands:
Code:
mysql -V
and
Code:
systemctl status mariadb
and
Code:
systemctl status mysql
 
Hi, please show the output of the following commands:
Code:
mysql -V
and
Code:
systemctl status mariadb
and
Code:
systemctl status mysql

Thanks for your reply

Code:
mysql -V
mysql  Ver 15.1 Distrib 10.1.45-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Code:
systemctl status mariadb
● mariadb.service - MariaDB 10.1.45 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2022-01-19 18:34:11 CET; 1s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 147903 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSIT
  Process: 147821 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd
  Process: 147818 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code
  Process: 147815 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=
 Main PID: 147903 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Jan 19 18:34:10 apparire.it systemd[1]: Starting MariaDB 10.1.45 database server...
Jan 19 18:34:11 apparire.it mysqld[147903]: 2022-01-19 18:34:11 139796112321920 [Note] /usr/sbin/
Jan 19 18:34:11 apparire.it mysqld[147903]: 2022-01-19 18:34:11 139796112321920 [Warning] Can't c
Jan 19 18:34:11 apparire.it mysqld[147903]: [97B blob data]
Jan 19 18:34:11 apparire.it mysqld[147903]: 2022-01-19 18:34:11 139796112321920 [ERROR] Aborting
Jan 19 18:34:11 apparire.it systemd[1]: mariadb.service: Main process exited, code=exited, status
Jan 19 18:34:11 apparire.it systemd[1]: Failed to start MariaDB 10.1.45 database server.
Jan 19 18:34:11 apparire.it systemd[1]: mariadb.service: Unit entered failed state.
Jan 19 18:34:11 apparire.it systemd[1]: mariadb.service: Failed with result 'exit-code'.
lines 1-21/21 (END)...skipping...
● mariadb.service - MariaDB 10.1.45 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2022-01-19 18:34:11 CET; 1s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 147903 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITIO
  Process: 147821 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /u
  Process: 147818 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=e
  Process: 147815 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=ex
 Main PID: 147903 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Code:
systemctl status mysql
● mariadb.service - MariaDB 10.1.45 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
   Active: failed (Result: exit-code) since Wed 2022-01-19 18:36:29 CET; 4s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 150121 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_
  Process: 150038 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && V
  Process: 150035 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_STA
  Process: 150033 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/
 Main PID: 150121 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Jan 19 18:36:28 apparire.it systemd[1]: Starting MariaDB 10.1.45 database server
Jan 19 18:36:29 apparire.it mysqld[150121]: 2022-01-19 18:36:29 140462091521408
Jan 19 18:36:29 apparire.it systemd[1]: mariadb.service: Main process exited, co
Jan 19 18:36:29 apparire.it systemd[1]: Failed to start MariaDB 10.1.45 database
Jan 19 18:36:29 apparire.it systemd[1]: mariadb.service: Unit entered failed sta
Jan 19 18:36:29 apparire.it systemd[1]: mariadb.service: Failed with result 'exi
lines 1-18/18 (END)...skipping...
● mariadb.service - MariaDB 10.1.45 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: en
   Active: failed (Result: exit-code) since Wed 2022-01-19 18:36:29 CET; 4s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 150121 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WS
  Process: 150038 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR
  Process: 150035 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START
  Process: 150033 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/ru
 Main PID: 150121 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Jan 19 18:36:28 apparire.it systemd[1]: Starting MariaDB 10.1.45 database server..
Jan 19 18:36:29 apparire.it mysqld[150121]: 2022-01-19 18:36:29 140462091521408 [N
Jan 19 18:36:29 apparire.it systemd[1]: mariadb.service: Main process exited, code
Jan 19 18:36:29 apparire.it systemd[1]: Failed to start MariaDB 10.1.45 database s
Jan 19 18:36:29 apparire.it systemd[1]: mariadb.service: Unit entered failed state
Jan 19 18:36:29 apparire.it systemd[1]: mariadb.service: Failed with result 'exit-
~
~
~
~
~
~
lines 1-18/18 (END)
 
Okay, so please show the output of the following commands:
Code:
journalctl -xe -u mariadb
Here are the last 20 lines enough.

And please execute
Code:
cat /etc/my.cnf

Please make sure to copy all texts, as your command output above is cut on the right side.
 
Code:
journalctl -xe -u mariadb
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Jan 20 10:24:59 apparire.it systemd[1]: mariadb.service: Unit entered failed state.
Jan 20 10:24:59 apparire.it systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 20 10:25:04 apparire.it systemd[1]: Starting MariaDB 10.1.45 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
Jan 20 10:25:05 apparire.it mysqld[76770]: 2022-01-20 10:25:05 139675451006336 [Note] /usr/sbin/mysqld (mysqld 10.1.45-MariaDB-0+deb9u1) starting as process 76770
Jan 20 10:25:05 apparire.it mysqld[76770]: 2022-01-20 10:25:05 139675451006336 [Warning] Can't create test file /var/lib/mysql/apparire.lower-test
Jan 20 10:25:05 apparire.it mysqld[76770]: [97B blob data]
Jan 20 10:25:05 apparire.it systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 20 10:25:05 apparire.it systemd[1]: Failed to start MariaDB 10.1.45 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Jan 20 10:25:05 apparire.it systemd[1]: mariadb.service: Unit entered failed state.
Jan 20 10:25:05 apparire.it systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 20 10:25:10 apparire.it systemd[1]: Starting MariaDB 10.1.45 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
Jan 20 10:25:11 apparire.it mysqld[76865]: 2022-01-20 10:25:11 140597857168768 [Note] /usr/sbin/mysqld (mysqld 10.1.45-MariaDB-0+deb9u1) starting as process 76865
Jan 20 10:25:11 apparire.it systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 20 10:25:11 apparire.it systemd[1]: Failed to start MariaDB 10.1.45 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Jan 20 10:25:11 apparire.it systemd[1]: mariadb.service: Unit entered failed state.
Jan 20 10:25:11 apparire.it systemd[1]: mariadb.service: Failed with result 'exit-code'.
Jan 20 10:25:16 apparire.it systemd[1]: Starting MariaDB 10.1.45 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
Jan 20 10:25:17 apparire.it mysqld[76963]: 2022-01-20 10:25:17 140443545853312 [Note] /usr/sbin/mysqld (mysqld 10.1.45-MariaDB-0+deb9u1) starting as process 76963
Jan 20 10:25:17 apparire.it mysqld[76963]: 2022-01-20 10:25:17 140443545853312 [Warning] Can't create test file /var/lib/mysql/apparire.lower-test
Jan 20 10:25:17 apparire.it mysqld[76963]: [97B blob data]
Jan 20 10:25:17 apparire.it mysqld[76963]: 2022-01-20 10:25:17 140443545853312 [ERROR] Aborting
Jan 20 10:25:17 apparire.it systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 20 10:25:17 apparire.it systemd[1]: Failed to start MariaDB 10.1.45 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Jan 20 10:25:17 apparire.it systemd[1]: mariadb.service: Unit entered failed state.
Jan 20 10:25:17 apparire.it systemd[1]: mariadb.service: Failed with result 'exit-code'.
lines 2372-2436/2436 (END)


Code:
cat /etc/my.cnf
cat: /etc/my.cnf: No such file or directory

my.cnf file missing
 
Yeah, I just forgot you are using Debian.

You could try creating the sock file manually:

Code:
mkdir /var/run/mysqld
touch /var/run/mysqld/mysqld.sock
chown -R mysql:mysql /var/run/mysqld
 
Back
Top