• 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

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • 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 need help error mariadb

ramater

New Pleskian
Server operating system version
centos 7 64bits
Plesk version and microupdate number
18
Server Error

500 Plesk\Exception\Database​

DB query failed: SQLSTATE[HY000] [2002] Connection refused
TypePlesk\Exception\Database
MessageDB query failed: SQLSTATE[HY000] [2002] Connection refused
FileMysql.php
Line79


mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2024-11-26 11:20:27 CST; 2s ago
Process: 8436 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 8435 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 8400 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 8435 (code=exited, status=0/SUCCESS)

Nov 26 11:20:26 elsalvad systemd[1]: Starting MariaDB database server...
Nov 26 11:20:26 elsalvad mariadb-prepare-db-dir[8400]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Nov 26 11:20:26 elsalvad mariadb-prepare-db-dir[8400]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Nov 26 11:20:26 elsalvad mysqld_safe[8435]: 241126 11:20:26 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Nov 26 11:20:26 elsalvad mysqld_safe[8435]: 241126 11:20:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Nov 26 11:20:27 elsalvad systemd[1]: mariadb.service: control process exited, code=exited status=1
Nov 26 11:20:27 elsalvad systemd[1]: Failed to start MariaDB database server.
Nov 26 11:20:27 elsalvad systemd[1]: Unit mariadb.service entered failed state.
Nov 26 11:20:27 elsalvad systemd[1]: mariadb.service failed.

Finished with exit code 3


Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.Finished with exit code 1


241126 01:54:59 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
241126 01:55:05 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
241126 1:55:06 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 20248 ...
241126 1:55:06 InnoDB: The InnoDB memory heap is disabled
241126 1:55:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
241126 1:55:06 InnoDB: Compressed tables use zlib 1.2.7
241126 1:55:06 InnoDB: Using Linux native AIO
241126 1:55:06 InnoDB: Initializing buffer pool, size = 128.0M
241126 1:55:06 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file ./ibdata1
241126 1:55:06 InnoDB: Could not open or create data files.
241126 1:55:06 InnoDB: If you tried to add new data files, and it failed here,
241126 1:55:06 InnoDB: you should now edit innodb_data_file_path in my.cnf back
241126 1:55:06 InnoDB: to what it was, and remove the new ibdata files InnoDB created
241126 1:55:06 InnoDB: in this failed attempt. InnoDB only wrote those files full of
241126 1:55:06 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
241126 1:55:06 InnoDB: remove old data files which contain your precious data!
241126 1:55:06 [ERROR] Plugin 'InnoDB' init function returned error.
241126 1:55:06 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
241126 1:55:06 [Note] Plugin 'FEEDBACK' is disabled.
241126 1:55:06 [ERROR] Unknown/unsupported storage engine: InnoDB
241126 1:55:06 [ERROR] Aborting

241126 1:55:06 [Note] /usr/libexec/mysqld: Shutdown complete

241126 01:55:06 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended


helpme please
 
[2024-11-26 12:41:14-06:00] INFO: Failed to start the database service. See /var/log/plesk/rc_actions.log and the service log for details.
[2024-11-26 12:41:14-06:00] ERROR: Could not start the database service.

this is log

STOP pleskrc
START pleskrc
INFO: [Tue Nov 26 12:41:08 CST 2024]: Service: mysql, Action: stop
Trying to stop MySQL server... failed
failed
done
STOP pleskrc
START pleskrc
INFO: [Tue Nov 26 12:41:08 CST 2024]: Service: mysql, Action: name
STOP pleskrc
START pleskrc
INFO: [Tue Nov 26 12:41:08 CST 2024]: Service: mysql, Action: start
Trying to start service mariadb... inactive
Nov 26 12:41:08 elsalvadordigital.net systemd[1]: Starting MariaDB database server...
Nov 26 12:41:08 elsalvadordigital.net mariadb-prepare-db-dir[13779]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Nov 26 12:41:08 elsalvadordigital.net mariadb-prepare-db-dir[13779]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Nov 26 12:41:08 elsalvadordigital.net mysqld_safe[13816]: 241126 12:41:08 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Nov 26 12:41:08 elsalvadordigital.net mysqld_safe[13816]: 241126 12:41:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Nov 26 12:41:14 elsalvadordigital.net systemd[1]: mariadb.service: control process exited, code=exited status=1
Nov 26 12:41:14 elsalvadordigital.net systemd[1]: Failed to start MariaDB database server.
Nov 26 12:41:14 elsalvadordigital.net systemd[1]: Unit mariadb.service entered failed state.
Nov 26 12:41:14 elsalvadordigital.net systemd[1]: mariadb.service failed.

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

STOP pleskrc


no run, helpme
 

In /etc/my.cnf add
Code:
innodb_force_recovery = 1

If it doesn't start, in rease it again until it starts. Values above 3 will start in readonly. You will have to dump all databases, reinitialize the /var/lib/mysql folder and import the sql dumps.

You shouldn't run in production with innodb_force_recovery greater than 0!
 
[mysqld]
innodb_force_recovery = 1
bind-address = ::ffff:127.0.0.1
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in Redirect Notice

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d


no backup


[root@elsalvadordigital ~]# mkdir /root/mysql_dumps_all
[root@elsalvadordigital ~]# cd /root && /usr/sbin/plesk db -e "show databases" | grep -v -E "^Database|information_schema|performance_schema|phpmyadmin" > dblist.txt
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
exit status 1
 
I gave him permissions 755 he was 777


[root@elsalvadordigital ~]# service mariadb status
Redirecting to /bin/systemctl status mariadb.service
â mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: activating (start-post) since Wed 2024-11-27 01:27:55 CST; 5s ago
Process: 22460 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 22495 (mysqld_safe); : 22498 (mariadb-wait-re)
CGroup: /system.slice/mariadb.service
ââ22495 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
ââ22698 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-err...
ââcontrol
ââ22498 /bin/sh /usr/libexec/mariadb-wait-ready 22495
ââ22749 sleep 1

Nov 27 01:27:55 elsalvadordigital.net systemd[1]: Starting MariaDB database server...
Nov 27 01:27:55 elsalvadordigital.net mariadb-prepare-db-dir[22460]: Database MariaDB is probably initialized in /var/lib/...ne.
Nov 27 01:27:56 elsalvadordigital.net mariadb-prepare-db-dir[22460]: If this is not the case, make sure the /var/lib/mysql...ir.
Nov 27 01:27:56 elsalvadordigital.net mysqld_safe[22495]: 241127 01:27:56 mysqld_safe unknown option '--innodb-force-recovery=1'
Nov 27 01:27:56 elsalvadordigital.net mysqld_safe[22495]: 241127 01:27:56 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Nov 27 01:27:56 elsalvadordigital.net mysqld_safe[22495]: 241127 01:27:56 mysqld_safe Starting mysqld daemon with databas...ysql
Hint: Some lines were ellipsized, use -l to show in full.


mariadb.log

241126 01:54:59 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
241126 01:55:05 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
241126 1:55:06 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 20248 ...
241126 1:55:06 InnoDB: The InnoDB memory heap is disabled
241126 1:55:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
241126 1:55:06 InnoDB: Compressed tables use zlib 1.2.7
241126 1:55:06 InnoDB: Using Linux native AIO
241126 1:55:06 InnoDB: Initializing buffer pool, size = 128.0M
241126 1:55:06 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file ./ibdata1
241126 1:55:06 InnoDB: Could not open or create data files.
241126 1:55:06 InnoDB: If you tried to add new data files, and it failed here,
241126 1:55:06 InnoDB: you should now edit innodb_data_file_path in my.cnf back
241126 1:55:06 InnoDB: to what it was, and remove the new ibdata files InnoDB created
241126 1:55:06 InnoDB: in this failed attempt. InnoDB only wrote those files full of
241126 1:55:06 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
241126 1:55:06 InnoDB: remove old data files which contain your precious data!
241126 1:55:06 [ERROR] Plugin 'InnoDB' init function returned error.
241126 1:55:06 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
241126 1:55:06 [Note] Plugin 'FEEDBACK' is disabled.
241126 1:55:06 [ERROR] Unknown/unsupported storage engine: InnoDB
241126 1:55:06 [ERROR] Aborting

241126 1:55:06 [Note] /usr/libexec/mysqld: Shutdown complete

241126 01:55:06 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
 
It looks like you've uninstalled the MariaDB package and haven't installed a new one. MariaDB upgrades should be performed only on healthy installs.
 
[root@elsalvadordigital ~]# yum install MariaDB-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 5.1 kB 00:00:00
* epel: d2lzkl7pfhq30w.cloudfront.net
PLESK_17_PHP52 | 2.9 kB 00:00:00
PLESK_17_PHP53 | 2.9 kB 00:00:00
PLESK_17_PHP54 | 2.9 kB 00:00:00
PLESK_17_PHP55 | 2.9 kB 00:00:00
PLESK_17_PHP56 | 2.9 kB 00:00:00
PLESK_17_PHP70 | 2.9 kB 00:00:00
PLESK_17_PHP71 | 2.9 kB 00:00:00
PLESK_17_PHP72 | 2.9 kB 00:00:00
PLESK_17_PHP73 | 2.9 kB 00:00:00
PLESK_17_PHP74 | 2.9 kB 00:00:00
PLESK_17_PHP80 | 2.9 kB 00:00:00
PLESK_17_PHP81 | 2.9 kB 00:00:00
PLESK_17_PHP82 | 2.9 kB 00:00:00
PLESK_17_PHP83 | 2.9 kB 00:00:00
PLESK_18_0_65-extras | 2.9 kB 00:00:00
http://asi-fs-n.contabo.net/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article


If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



One of the configured repositories failed (CentOS-7-Base),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=base ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable base
or
subscription-manager repos --disable=base

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://asi-fs-n.contabo.net/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
 
Looks like you have a problem with the repositories. Please have a look at GitHub - AtlasGondal/centos7-eol-repo-fix: CentOS 7 has reached its End of Life (EOL), which means its repositories may no longer be maintained and accessible. However, you can still use some workarounds to keep your CentOS 7 system functional by pointing to alternative or archived repositories. to fix the repositories then try to install the MariaDB-server.

However, you should have a MariaDB repository and install form that one since the MariaDB-server from the base repository is MariaDB 5.5 (very old).

What version of MariaDB did you have installed before you uninstalled it?
 
-- MySQL dump 10.14 Distrib 5.5.68-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: psa
-- ------------------------------------------------------
-- Server version 5.5.68-MariaDB
 
I have solved it by doing the following, according to the help posts, reinstall mariadb and finally I have made a general repair,
plesk repair all.


 
Back
Top