Question

Unable to migrate from mysql 5.7 to MariaDB 10.3 with WHM CPANEL

Posted January 28, 2020 1.6k views
MariaDB

Hello, i just purchased a new droplet in DG with WHM cpanel and imported several accounts from an other vps hosted by an other provider, i used the transfer tool, and all is working as it should be, but probably i did a little mistake, seems like in the previous vps it had MariaDB, but in the new droplet i have mysql 5.7, so first i created a new test droplet, and try to do the upgrade but it failed, i got this log:

Starting process with log file at /var/cpanel/logs/mysql_upgrade.20200128-193047/unattended_upgrade.log
Obtained version information from system.
Beginning “MariaDB 10.2” upgrade...
Obtained version information from system.
Ensuring the “MariaDB102” repository is available and working.
checkyum version 22.3 (excludes: bind-chroot ruby)
Restarting mysql service.
Waiting for “mysql” to restart ……waiting for “mysql” to initialize ………finished.

Service Status
mysqld (/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid) is running as mysql with PID 23121 (systemd+/proc check method).

Startup Log
Jan 28 19:30:49 cpanel-whm-centos-s-1vcpu-1gb-sfo2-01 systemd[1]: Starting MySQL Server...
Jan 28 19:30:50 cpanel-whm-centos-s-1vcpu-1gb-sfo2-01 systemd[1]: Started MySQL Server.

Log Messages
2020-01-28T19:30:50.937582Z 0 [Note] /usr/sbin/mysqld: ready for connections.
2020-01-28T19:30:49.615690Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

mysql restarted successfully.
Multiple versions of the coreutils are installed: package MariaDB-client is not installed
package MariaDB-common is not installed
package MariaDB-compat is not installed
package MariaDB-devel is not installed
package MariaDB-server is not installed
package MariaDB-shared is not installed
coreutils 8.22-24.el7
coreutils 8.22-23.el7
grep 2.20-3.el7
perl-DBI 1.627-4.el7
shadow-utils 4.6-5.el7
shadow-utils 4.1.5.1-25.el7_6.1 at /usr/local/cpanel/Cpanel/SysPkgs/YUM.pm line 594.
Obtained version information from system.
Proceeding with MySQL/MariaDB upgrade despite the following:
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 available here. Normal: When you upgrade from MySQL® to MariaDB 10.2 or later, the mysql_upgrade utility may emit several database table-related errors. The discrepancies in the tables between MySQL and MariaDB versions produce the errors; however, the upgrade process will resolve these issues.

any recomendations?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hi @imuriel,

IT seems like you are trying to upgrade MySQL to MariaDB from the terminal however are you using the cPanel script meant for it? If you are not, then this is most probably the reason behind the failing.

The best way to upgrade MySQL is from WHM. Login and in the Search type in MySQL/MariaDB Upgrade. As soon as you are there just follow the steps.

Regards,
KDSys

  • Hello KDsys thank you for your reply, i thought taht i had mention that actually i was doing the upgrade trough mysql/mariaDb upgrade tool, even i tried with a completely new droplet, with no databases in it, and starated the upgrade process but it failed for the same reason,

    Multiple versions of the coreutils are installed: package MariaDB-client is not installed
    package MariaDB-common is not installed
    

    so i tried to search mariadb process in console, and seems like there is nothing whith that name.

    in theory whm/cpanel instalations should have MariaDB 10.3, but maybe it does not.

    • Hi @imuriel,

      After reading about it in the cPanel forum and documentation it seems this was reported as a bug on certain cPanel versions. Can you try and upgrade cPanel to the newest possible version and then try to upgrade MySQL to MariaDB?

      Regards,
      KDSys

Hello, @imuriel

Keep in mind that you can always update MySQL / MariaDB using the command line as well. Sometimes WHM might not be available or loading and the only way to complete the process will be using the terminal. I’ve just posted a tutorial on how to do this and you can check it in case you need to update the version again in the future:

https://www.digitalocean.com/community/questions/update-mysql-version-cpanel-whm-using-api-command-line-terminal

Hope this helps!

Regards,
Alex

Submit an Answer