mysqld has no problem above, only mariadb gives an error
And will not restart. I installed mysqld + mariadb from the beginning, but it still gives an error.
All versions of the latest versions are on CentOS8
This problem occurred after executing the commands (attached photo).
enter image description here
And according to the instruction of this site, I gave the command line:
https://www.a2hosting.com/kb/developer-corner/mysql/reset-mysql-root-password
[root@server ~]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mariadb.service - MariaDB database server
Loaded: loaded (/etc/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: timeout) since Tue 2020-12-29 20:03:28 CET; 24min ago
Process: 19000 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 18971 ExecStartPre=/bin/sh -c [ -x /usr/bin/galera_recovery ] || exit 0; VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemc>
Process: 18969 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 19000 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 29 20:03:27 server.xx.xx mysqld[19000]: 2020-12-29 20:03:27 0 [Note] InnoDB: Starting shutdown...
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Plugin 'InnoDB' init function returned error.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [Note] Plugin 'FEEDBACK' is disabled.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not >
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Failed to initialize plugins.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Aborting
Dec 29 20:03:28 server.xx.xx systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 20:03:28 server.xx.xx systemd[1]: mariadb.service: Failed with result 'timeout'.
Dec 29 20:03:28 server.xx.xx systemd[1]: Failed to start MariaDB database server.
lines 1-21/21 (END)...skipping...
● mariadb.service - MariaDB database server
Loaded: loaded (/etc/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: timeout) since Tue 2020-12-29 20:03:28 CET; 24min ago
Process: 19000 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 18971 ExecStartPre=/bin/sh -c [ -x /usr/bin/galera_recovery ] || exit 0; VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-envi>
Process: 18969 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 19000 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Dec 29 20:03:27 server.xx.xx mysqld[19000]: 2020-12-29 20:03:27 0 [Note] InnoDB: Starting shutdown...
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Plugin 'InnoDB' init function returned error.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [Note] Plugin 'FEEDBACK' is disabled.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Failed to initialize plugins.
Dec 29 20:03:28 server.xx.xx mysqld[19000]: 2020-12-29 20:03:28 0 [ERROR] Aborting
Dec 29 20:03:28 server.xx.xx systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 20:03:28 server.xx.xx systemd[1]: mariadb.service: Failed with result 'timeout'.
Dec 29 20:03:28 server.xx.xx systemd[1]: Failed to start MariaDB database server.
update :
sudo systemctl restart mariadb Job for mariadb.service failed because
a timeout was exceeded. See "systemctl status mariadb.service" and
"journalctl -xe" for details.
my.cnf :
[mysqld]
max_allowed_packet=64M
local-infile=0
innodb_file_per_table=1
query_cache_type=1
query_cache_size =32M
query_cache_limit=1M
2
Answers
If you are running both mysql and mariadb, you need to set their configuration to use different ports, sockets, data directories, log files, etc. Sharing the same data files is not going to work.
Even with different data, it really isn’t worth the effort. Run them on different servers or vms.
I am assuming your goal is not to run both services on one server.
MariaDB is a replacement for MySQL and they are intended to run both on the same server without extensive configuration. On most distributions they share paths both regarding configuration and data.
Unless you explain your use case to run both services next to each other I am assuming your problem is simply trying to run both services. Stick to one and you are good to go.