0

My Moodle site required I upgrade its database from MySQL 5.7.3 to MariaDB 10.2. I upgraded it to 10.3 through the MySQL/MariaDB Upgrade package on WHM, but after the upgrade, it gave this error:

"The MySQL/MariaDB server is not currently running. If this is not intentional, you may experience problems with your upgrade."

Due to this, my PhpMyAdmin has not been working with an error:

Failed to connect to “/var/lib/mysql/mysql.sock”; will fall back to TCP/IP. (Cpanel::Exception::IO::SocketConnectError/(XID yhcqsd) The system failed to connect a UNIX domain socket to “/var/lib/mysql/mysql.sock” because of an error: Connection refused at /usr/local/cpanel/Cpanel/Autodie/CORE/connect.pm line 29.
        Cpanel::Autodie::connect(GLOB(0x3deab18), "\x{1}\x{0}/var/lib/mysql/mysql.sock\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}\x{0}"...) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 181
        Cpanel::MysqlUtils::Unprivileged::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
        eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
        Try::Tiny::try(CODE(0x3d53f70), Try::Tiny::Catch=REF(0x3d96b98)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 186
        Cpanel::MysqlUtils::Unprivileged::_get_socket("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 90
        Cpanel::MysqlUtils::Unprivileged::get_version_from_host("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 64
        Cpanel::MysqlUtils::Running::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
        eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
        Try::Tiny::try(CODE(0x3c23df0), Try::Tiny::Catch=REF(0x3dc2688)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 68
        Cpanel::MysqlUtils::Running::is_mysql_running() called at whostmgr/bin/whostmgr.pl line 6734
        main::mysqlupgrade("mysqlupgrade") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 366
        Whostmgr::Dispatch::_do_call("mysqlupgrade", HASH(0x317bc98), HASH(0x316dfa0)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 178
        Whostmgr::Dispatch::dispatch("mysqlupgrade", 1, ARRAY(0x317bc08), HASH(0x316dfa0)) called at whostmgr/bin/whostmgr.pl line 441
    ) at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 184.
     at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 184.
        Cpanel::MysqlUtils::Unprivileged::__ANON__(Cpanel::Exception::IO::SocketConnectError=HASH(0x3dead10)) called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 121
        Try::Tiny::try(CODE(0x3d53f70), Try::Tiny::Catch=REF(0x3d96b98)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 186
        Cpanel::MysqlUtils::Unprivileged::_get_socket("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Unprivileged.pm line 90
        Cpanel::MysqlUtils::Unprivileged::get_version_from_host("localhost", undef) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 64
        Cpanel::MysqlUtils::Running::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
        eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
        Try::Tiny::try(CODE(0x3c23df0), Try::Tiny::Catch=REF(0x3dc2688)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Running.pm line 68
        Cpanel::MysqlUtils::Running::is_mysql_running() called at whostmgr/bin/whostmgr.pl line 6734
        main::mysqlupgrade("mysqlupgrade") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 366
        Whostmgr::Dispatch::_do_call("mysqlupgrade", HASH(0x317bc98), HASH(0x316dfa0)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 178
        Whostmgr::Dispatch::dispatch("mysqlupgrade", 1, ARRAY(0x317bc08), HASH(0x316dfa0)) called at whostmgr/bin/whostmgr.pl line 441

All my sites on the server are down, and they threw an "unable to establish connection to database" error. I don't know where to go from here.

Please what can I do?

  • The first error message is the clue: your database isn't running, so start it. You've switched database product (MariaDb <>MySQL) so you might have a conflict, or you might have the wrong package running. If the database won't start it should give you some indication why. We'd need to see that to go further. – Tangentially Perpendicular Sep 16 '21 at 20:04
  • Thank you! So you made a great observation, there might be some conflict with mariadb and mysql; I feel that could be a possible cause. Would you advice I uninstall mysql? and would it affect my existing databases? – Dominion Ikpeawujor Sep 16 '21 at 20:23
  • If it were me, I'd uninstall the old software, but only after I'd verified that the new software was working correctly and all the data had been transferred successfully. I have no idea what process WHM followed to upgrade your database, and I'm only guessing why it's not running now. Whatever you do, make sure you have a cast-iron backup somewhere other than on the machine you're working on. – Tangentially Perpendicular Sep 16 '21 at 20:31

0 Answers0