{"id":2290,"date":"2025-06-28T15:07:57","date_gmt":"2025-06-28T19:07:57","guid":{"rendered":"https:\/\/www.unliterate.net\/?p=2290"},"modified":"2025-06-28T15:07:58","modified_gmt":"2025-06-28T19:07:58","slug":"updating-mariadb-on-4-and-5-kernels","status":"publish","type":"post","link":"https:\/\/www.unliterate.net\/index.php\/2025\/06\/28\/updating-mariadb-on-4-and-5-kernels\/","title":{"rendered":"Updating MariaDB on 4.* and 5.* kernels&#8230;"},"content":{"rendered":"\n<p>A minor adventure, yet one worth documenting. I&#8217;ve been wanting to get MariaDB updated on my VPS for the longest of time but do it in a way with precompiled binaries so I have some control over what I run and, if needed, some flexibility with versions without having to <code>dnf<\/code>\/<code>yum<\/code>\/<code>apt-get<\/code> things in and out.<\/p>\n\n\n\n<p>To note I tested this on my test machine running <code>4.18.0-348<\/code> and it wasn&#8217;t quite happy with getting <code>11.8.2<\/code> rolled out onto it. I realized that the home test machine <em>is a bit old<\/em> so I had to defer to <code>10.11.13<\/code>. Once that was all done I fired up a virtual Rocky9 host running <code>5.14.0-*<\/code> and, with the same instructions with the test machine successfully got <code>11.8.2<\/code> slammed on that with no data loss.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Grabbing the <a href=\"https:\/\/mariadb.org\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">11.8.2 binary<\/a> was the first bit of ease. Extracting it had some good instructions in <code>INSTALL-BINARY<\/code>, but these could only take me so far since they assumed it was a fresh install.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">INSTALL-BINARY: Revised<\/h2>\n\n\n\n<p>The better instructions for upgrading an already-installed system pretty much came down to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shell> #groupadd mysql (do not need to do)\nshell> #useradd -g mysql mysql  (do not need to do)\nshell> cd \/usr\/local\nshell> gunzip &lt; \/path\/to\/mariadb-VERSION-OS.tar.gz | tar xvf -\nshell> ln -s full-path-to-mariadb-VERSION-OS mysql\nshell> cd mysql\nshell> chown -R mysql .\nshell> chgrp -R mysql .\n#----- Don't do below -----\nshell> scripts\/mysql_install_db --user=mysql\nshell> chown -R root .\nshell> chown -R mysql data\nshell> bin\/mysqld_safe --user=mysql &amp;\n#----- Instead, do the following -----\nsudo systemctl stop mysqld\n# database is still in \/var\/lib\/mysql\nsudo mkdir data\ncd data\nsudo cp -R \/var\/lib\/mysql\/* .\ncd ..\nsudo chown -R root .\nsudo chown -R mysql data\nsudo yum remove mariadb-server\n# Above gives me no my.cnf, so I'll need to manually copy from \/etc\/my.cnf.d to \/etc\/my.cnf and remark out everything except socket= and log-error=\n\n# Swapping out systemd service\nsudo ln -s \/usr\/local\/mysql\/support-files\/systemd\/mysql.service \/etc\/systemd\/system\/mysql.service\nsudo ln -s \/usr\/local\/mysql\/support-files\/systemd\/mysqld.service \/etc\/systemd\/system\/mysqld.service\nsudo systemctl daemon-reload\nsudo systemctl start mysqld\n\nsudo .\/bin\/mariadb-upgrade<\/code><\/pre>\n\n\n\n<p>No explanation, really. This process from top\/down helped for both kernels and now I&#8217;m updated and happy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A minor adventure, yet one worth documenting. I&#8217;ve been wanting to get MariaDB updated on my VPS for the longest of time but do it in a way with precompiled binaries so I have some control over what I run and, if needed, some flexibility with versions without having to dnf\/yum\/apt-get things in and out. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,17],"tags":[],"class_list":["post-2290","post","type-post","status-publish","format-standard","hentry","category-geek-instructions","category-linux"],"_links":{"self":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/2290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/comments?post=2290"}],"version-history":[{"count":1,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/2290\/revisions"}],"predecessor-version":[{"id":2291,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/2290\/revisions\/2291"}],"wp:attachment":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/media?parent=2290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/categories?post=2290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/tags?post=2290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}