Skip to main content

How to Downgrade MySQL 8.0 to MariaDB 10.3 (Fresh install)

Comments

14 comments

  • Steini Petur
    0
  • Steini Petur
    I realize the Install failing isnt clean, its some module disable in some repo, just did this to have WHM handle this part, then I took over with the install once the disabling is done.
    0
  • cPRex Jurassic Moderator
    Thanks for sharing!
    0
  • Steini Petur
    Hi @cPRex here is a cleaner version of this and much simpler 1. You start with yum remove mysql in Terminal, finish removing it 2. You move the current /var/lib/mysql to /var/lib/mysql.old or delete, but moving is always better 3. Edit the /var/cpanel/cpanel.config from mysql-version=8.0 to mysql-version=10.3 3. WHM > MySQL/MariaDB Upgrade > 10.3 > Unattended. This will cause this Obtained version information from cpanel.config. Beginning "MariaDB 10.3" upgrade... nsuring the "MariaDB103" repository is available and working. Disabling package module mysql Disabling package module mariadb checkyum version 22.3 (excludes: bind-chroot) .,.... more autoscroll items Dependencies resolved. Nothing to do. Complete! MariaDB installed from official repository. Building configuration. mysql restarted successfully. MariaDB upgrade completed successfully
    4. Lets reconnect Root password WHM > Mysql Root Password Updated the password for the active MySQL profile. Applications using MySQL will now be updated. Updating "DBcache" configuration " Success "Done Updating "Roundcube" configuration " Roundcube is configured to use SQLite. This update is for Roundcube using MySQL. Running /usr/local/cpanel/bin/update-roundcube-sqlite-db. Success "Done Updating "phpMyAdmin" configuration " Success "Done You have successfully changed "root""s MySQL password.
    Done!, I wish I could just delete my initial 2 replies and just SET this as the only thing in the reply, to avoid anyone the other hassle.. All done Current Version MariaDB 10.3.35-MariaDB Tried, tested, works.. @cPRex Maybe you can edit my first 2 and just change text to "...." so people will see this post? or SPLIT my post into a new thread and delete the initial thread..
    0
  • cPRex Jurassic Moderator
    Done!
    0
  • WorkinOnIt
    Tried, tested, works..

    This was very helpful and should be in the official docs. Other users please note - this should only be done on clean install, not where there are existing databases
    0
  • Steini Petur
    This was very helpful and should be in the official docs. Other users please note - this should only be done on clean install, not where there are existing databases

    Glad you found it helpful, It sure helped me to figure this out, I have used this now twice since then during a reload of a server after a team colleague forgot the initial settings before launching the installer. Glad it helps someone else :)
    0
  • CanSpace
    FYI this method still more or less works, but after you do a yum remove of mysql, and update the cpanel.config file, the MySQL/MariaDB Upgrade section in WHM no longer gives you the option to install MariaDB. The way around this is to perform that step using the API instead. ie from the command line run: whmapi1 --output=jsonpretty start_background_mysql_upgrade version='10.3'
    0
  • Radeonpower
    Is it possible to do MariaDB 10.5 to MySQL8 (not fresh) without loosing any data/databases/users?
    0
  • cPRex Jurassic Moderator
    Yes, I don't see why that would be an issue. You'll just want to ensure that your databases and queries are compatible with that version.
    0
  • Steini Petur
    FYI this method still more or less works, but after you do a yum remove of mysql, and update the cpanel.config file, the MySQL/MariaDB Upgrade section in WHM no longer gives you the option to install MariaDB. The way around this is to perform that step using the API instead. ie from the command line run: whmapi1 --output=jsonpretty start_background_mysql_upgrade version='10.3'

    Great addition to this thread, I somehow didn't end up not being able to do it, maybe they added something later? At least at the time I used this I didn't have to do this but its good to have nontheles =)
    0
  • gorilla
    All good
    0
  • quietFinn
    @gorilla what is your operating system?
    0
  • Steini Petur
    FYI this method still more or less works, but after you do a yum remove of mysql, and update the cpanel.config file, the MySQL/MariaDB Upgrade section in WHM no longer gives you the option to install MariaDB. The way around this is to perform that step using the API instead. ie from the command line run: whmapi1 --output=jsonpretty start_background_mysql_upgrade version='10.3'

    You were right, something changed later after My initial post, Your version is needed after Step 3, I am dealing with this right now on a new machine.
    0

Please sign in to leave a comment.