[CPANEL-23547] MySQL down after failed MariaDB upgrade

Jeff P.

Well-Known Member
Feb 2, 2016
61
10
8
Daytona Beach, Florida, USA
cPanel Access Level
DataCenter Provider
Error while connecting to MySQL: (XID agrq9d) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)) Error while connecting to MySQL: (XID agrq9d) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)) at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 398, <STDIN> line 1.
After cpanel update today to latest version. and after trying a forced update and deleting my.cnf.

Been stuck on this during a MySQL Upgrade attempt:

upload_2018-11-7_16-10-33.png
 

Jeff P.

Well-Known Member
Feb 2, 2016
61
10
8
Daytona Beach, Florida, USA
cPanel Access Level
DataCenter Provider
[[email protected] ~]# service mysql restart
Redirecting to /bin/systemctl restart mysql.service
Failed to restart mysql.service: Unit not found.
[[email protected] ~]# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
Failed to restart mysqld.service: Unit not found.
[[email protected] ~]#
 

Jeff P.

Well-Known Member
Feb 2, 2016
61
10
8
Daytona Beach, Florida, USA
cPanel Access Level
DataCenter Provider
Whostmgr::Dispatch::_do_call("mysqlupgrade", HASH(0x3b5c4a8), HASH(0x3b5e980)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 157
Whostmgr::Dispatch::dispatch("mysqlupgrade", 1, ARRAY(0x3b5c670)) called at whostmgr/bin/whostmgr.pl line 582
) This issue could also hinder mysql_upgrade's ability to run, which could potentially leave MySQL in an unusable state if you proceed.
Critical: MariaDB enables "strict mode" by default as of version 10.2. Strict mode controls how MariaDB and MySQL handle invalid or missing values in data-change statements such as INSERT or UPDATE. Applications not built with strict mode enabled may cause undesired behavior; please verify applications using MariaDB are compatible before upgrading. More information about strict mode is availablehere.
Obtained version information from system.
(XID btx9d5) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2))
Ensuring the “MariaDB102” repository is available and working.
checkyum version 22.3
Ensuring that the package “MariaDB-client” with version matching “10.2” is available.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello @Jeff P.,

I recommend opening a support ticket if MySQL is not starting so we can quickly access the system and see what's happening. If MySQL is running and that's not a concern at this point, paste the contents from the following files:

Code:
/etc/my.cnf
/var/cpanel/rpm.versions.d/local.versions
Thank you.
 

Jeff P.

Well-Known Member
Feb 2, 2016
61
10
8
Daytona Beach, Florida, USA
cPanel Access Level
DataCenter Provider
It's a production server with about $15,000 in ads running per day. I dont have time to wait for them.

What is the safe method of uninstalling MariaDB 10.2 and reinstalling MySQL 5.6?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
New It's a production server with about $15,000 in ads running per day. I dont have time to wait for them.
If you open the ticket now and provide me with the ticket number, I can set it to emergency status since a service is down. It will be investigated right away.

Thank you.
 

Jeff P.

Well-Known Member
Feb 2, 2016
61
10
8
Daytona Beach, Florida, USA
cPanel Access Level
DataCenter Provider
Your Support Request ID is: 10670763

Also, all MYSQL related controls in WHM are gone. Upgrade, restart, everything.


Ticket made, could not grant support access:

Error:WHM Authorization failed with the following error: The server detected that an SSH key for user “root” in Ticket ID “10670763” and Server “1” already exists. Run the following cPanel script and refresh your browser: /scripts/updatesupportauthorizations. You may skip this server or correct the problem and try again.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello @Jeff P.,

I can confirm the ticket was opened and one of our Technical Analysts was able to access the system to begin the investigation. You should receive another response shortly.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hi @Jeff P.,

I'm glad to see it was taken care of. It looks like the upgrade process failed to succeed in installing the MariaDB RPMs. Manually installing the required RPMs solved the issue.

Note that internal case CPANEL-23547 is open to ensure MariaDB RPMs can be installed prior to removing MySQL when upgrading from MySQL to MariaDB.

Thanks!