Is DBD:maria required?
Customer runs their own box (OS AlmaLinux v8.9.0 STANDARD vmware cPanel Version 116.0.11) and they upgraded to MariaDB 10.3.
They've been running it for a couple of years. Recently, they started having issues with it not starting. We took a look and can't see any reasons why other than it fails; starting via WHM:
Waiting for “mysql” to start ……………failed.
Cpanel::Exception::Services::StartError Service Status
undefined status from Cpanel::ServiceManager::Services::Mysql
Service Error
(XID vqe5y3) The “mysql” service failed to start.
Startup Log
Feb 14 09:48:49 cp5.domain.tld systemd[1]: Starting MariaDB 10.3.39 database server...
Feb 14 09:49:21 cp5.domain.tld systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 09:49:21 cp5.domain.tld systemd[1]: mariadb.service: Failed with result 'exit-code'.
Feb 14 09:49:21 cp5.domain.tld systemd[1]: Failed to start MariaDB 10.3.39 database server.
Attempted start via command line using webmin:
Starting service mariadb.service ..
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
Feb 14 09:33:25 cp5.domain.tld systemd[1]: Starting MariaDB 10.3.39 database server... -- Subject: Unit mariadb.service has begun start-up -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- Unit mariadb.service has begun starting up. Feb 14 09:33:57 cp5.domain.tld systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE Feb 14 09:33:57 cp5.domain.tld systemd[1]: mariadb.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- The unit mariadb.service has entered the 'failed' state with result 'exit-code'. Feb 14 09:33:57 cp5.domain.tld systemd[1]: Failed to start MariaDB 10.3.39 database server. -- Subject: Unit mariadb.service has failed -- Defined-By: systemd -- Support: https://access.redhat.com/support -- -- Unit mariadb.service has failed. -- -- The result is failed.
We got a notice in webmin:
The Perl module DBD::mysql is not installed on your system, so Webmin will not be able to reliably access your MariaDB database.
Checking perl modules in WHM, we discover it isn't installed, nor is DBD::maria. Researching further, we discover that at some point cPanel removed DBD::mysql, but didn't replace it with DBD:maria.
Questions:
1. Is DBD::mysql/maria required? We can install the perl module DBD::maria via WHM, but not DBD::mysql.
2. Should customer upgrade to MariaDB 10.6? 103. has been EOLd for a few months.
-
Hey there! This tool may be required for Webmin, but it's not required for anything cPanel uses.
There's nothing wrong with updating the version, but I'd get the system working in its current state first before attempting an update. The update will not process with the database server offline and inaccessible.
Do you see anything helpful inside the MySQL error log? By default this is at /var/log/mysqld.log, but the location is set in /etc/my.cnf.
0 -
We just found this; no clue as to how it happened:
check_mysql has determined that there are corrupted database tables
cPanel & WHM has determined that the following database tables are corrupt:
Database Error mysql.gtid_slave_pos Error : Table 'mysql.gtid_slave_pos' doesn't exist in engine mysql.innodb_index_stats Error : Table 'mysql.innodb_index_stats' doesn't exist in engine mysql.innodb_table_stats Error : Table 'mysql.innodb_table_stats' doesn't exist in engine mysql.slave_master_info Error : Table 'mysql.slave_master_info' doesn't exist in engine mysql.slave_relay_log_info Error : Table 'mysql.slave_relay_log_info' doesn't exist in engine mysql.slave_worker_info Error : Table 'mysql.slave_worker_info' doesn't exist in engine mysql.transaction_registry Error : Table 'mysql.transaction_registry' doesn't exist in engine
0 -
(what happened to the quote function?)
CPRex:
Hey there! This tool may be required for Webmin, but it's not required for anything cPanel uses.
There's nothing wrong with updating the version, but I'd get the system working in its current state first before attempting an update. The update will not process with the database server offline and inaccessible.
Do you see anything helpful inside the MySQL error log? By default this is at /var/log/mysqld.log, but the location is set in /etc/my.cnf.
The tool is required for perl apps to access mysql/maria databases, per vendor docs.
Installing DBD:mariaDB went smoothly, even with mariadb not running.
Logs show the Aria plugin (?) is missing. We're researching. This takes longer when the customer is on the other side of the world.
0 -
Seems Aria failing is a thing:
This worked:
[ root@cp5 ~># mysqladmin shutdown
[ Wed Feb 14 13:02:09 ]
[ root@cp5 ~># /scripts/restartsrv_mysql
Waiting for âmysqlâmysqlâ
Service Status
mariadb (/usr/sbin/mysqld) is running as mysql with PID 64138 (systemd+/proc check method).
Startup Log
Feb 14 13:02:19 cp5.domain.tld systemd[1]: Starting MariaDB 10.3.39 database server...
Feb 14 13:02:20 cp5.domain.tld systemd[1]: Started MariaDB 10.3.39 database server.
mysql started successfully.Now, how to prevent that from happening in the future?
0 -
[added: damn, spent so long checking at testing things, other people got here first - I swear there were no replies when I started typing!]
Hi,
Few things here:
a) You reference "Webmin" a few times - that's actually a "rival" control panel to cPanel Inc's WHM/cPanel product. It is not advisable to have both on the same server as they will be trying to do the same sort of thing and will result in general badness happening.
b) MariaDB is a fork of MySQL (by the original developer after MySQL Inc got taken over by Oracle - another database company) and is, in most cases, 99% compatible with MySQL libraries etc. In fact, the compatibility is so high that most connection libraries which target MariaDB are still called "mysql" - for example, the PHP MySQL module works with both. It does seem that Perl's DBD::mysql library actually dropped support for MySQL 5.7 and MariaDB when DBD::mysql reached version 5 (see https://github.com/perl5-dbi/DBD-mysql/issues/405#issuecomment-1818501464 )
c) You should be able to install DBD::MariaDB via WHM's Software->Install a Perl Module (aka Software->Module Installers->Perl) - check the capitalisation. However, I was only able to do this after I had upgraded the Perl module DBI from 1.641 to version 1.643 - this can be done by just "reinstalling" it from the same interface.
d) If you still need DBD::mysql installed for script compatibility, you'll need to install the latest v4 branch version (4.052) semi-manually using the root command prompt:
/usr/local/cpanel/bin/cpanm DBD::mysql@4.052
Again - you may need to have upgraded DBI beforehand.
e) My server is currently running MariaDB 10.6 (with MariaDB 10.11 being offered as "Experimental") - this is on AlmaLinux v8.9.0 STANDARD. If you go to WHM SQL Services->MySQL/MariaDB Upgrade, there might be an upgrade path listed there and you should upgrade to 10.6 as soon as possible.
f) None of the above is what is stopping MariaDB starting (or shouldn't be stopping it). From the root command, try restarting MariaDB and then having a look at the logs:
/scripts/restartsrv_mysql
tail /var/log/mysqld.log(and, yes, those commands will work - I've just tested them - on MariaDB!). Does it give any indication as to why it was unable to start?
0 -
Back to my original questions:
1. Is DBD::mysql/maria required? We can install the perl module DBD::maria via WHM, but not DBD::mysql.
Perl scripts that access mysql/maria apparently need DBD::mariaDB or DBD::mysql. I'm not a perl person.
2. Should customer upgrade to MariaDB 10.6? 10.3 has been EOLd for a few months.
I'd say yes. Upgrade may fix the Aria problem.
0
Please sign in to leave a comment.
Comments
6 comments