MARIADB-UPGRADE(1)
β¨ MARIADB-UPGRADE β¨
okay bestie so this is the mariadb-upgrade page from the MariaDB Database System manual, and it's literally your post-upgrade glow-up ritual π
πΈ NAME πΈ
mariadb-upgrade β check tables for MariaDB upgrade (mariadb-upgrade is now a symlink to mariadb-upgrade)
π¦ SYNOPSIS π¦
mariadb-upgrade [options]
π DESCRIPTION π
so mariadb-upgrade goes through every single table in every single database and vibe-checks them for incompatibilities with the current version of the MariaDB Server. not only that, it also upgrades the system tables so you can actually take advantage of the new privileges or capabilities that might've been added. it's giving spring cleaning for your server π§Ήβ¨
you should run mariadb-upgrade EVERY time you upgrade MariaDB. no skipping, bestie, fr fr.
if a table turns out to have a possible incompatibility, mariadb-upgrade performs a table check on it. and if problems show up? it attempts a table repair. it's got your back π«Ά
Note π On Windows Server 2008 and Windows Vista, you must run mariadb-upgrade with administrator privileges. You can do this by running a Command Prompt as Administrator and running the command. Failure to do so may result in the upgrade failing to execute correctly. like, it will simply not work, no cap π
Caution β οΈ You should always back up your current MariaDB installation before performing an upgrade. this is not a drill, back it up first, periodt π
to use mariadb-upgrade, make sure the server is running, and then invoke it like this:
shell> mariadb-upgrade [options]
after running mariadb-upgrade, stop the server and restart it so that any changes made to the system tables actually take effect. the changes need a lil refresh moment, iykyk β¨
mariadb-upgrade executes the following commands to check and repair tables and to upgrade the system tables:
mariadb-check --all-databases --check-upgrade --auto-repair
mariadb < fix_priv_tables
mariadb-check --all-databases --check-upgrade --fix-db-names --fix-table-names
notes about the preceding commands, bestie, listen up:
- because mariadb-upgrade invokes mariadb-check with the
--all-databasesoption, it processes all tables in all databases, which might take a long time to complete. Each table is locked and therefore unavailable to other sessions while it is being processed. Check and repair operations can be time-consuming, particularly for large tables. so yeah, maybe don't do this at peak hours π - for details about what checks the
--check-upgradeoption entails, see the description of theFOR UPGRADEoption of theCHECK TABLEstatement. fix_priv_tablesrepresents a script generated internally by mariadb-upgrade that contains SQL statements to upgrade the tables in themysqldatabase.
all checked and repaired tables get marked with the current MariaDB version number. this is so that next time you run mariadb-upgrade with the same version of the server, it can tell whether there's any need to check or repair the table again. efficient queen π
mariadb-upgrade also saves the MariaDB version number in a file named mariadb-upgrade_info in the data directory. this is used to quickly check whether all tables have been checked for this release so that table-checking can be skipped. to ignore this file and perform the check regardless, use the --force option. so if you wanna be stubborn about it, --force is right there π
for this reason, mariadb-upgrade needs to be run as a user with write access to the data directory.
if you install MariaDB from RPM packages on Linux, you must install the server and client RPMs. mariadb-upgrade is included in the server RPM but requires the client RPM because the latter includes mariadb-check. they're a package deal, literally π€
mariadb-upgrade supports the following options, which can be specified on the command line or in the [mariadb-upgrade] and [client] option file groups. other options are passed to mariadb-check. for example, it might be necessary to specify the --password[=password] option. mariadb-upgrade also supports the options for processing option files.
π OPTIONS π
--help,-?β Display a short help message and exit. your lil SOS button π--basedir=pathβ Old option accepted for backward compatibility but ignored. it's just vibing there, doing nothing π--character-sets-dir=pathβ Old option accepted for backward compatibility but ignored.--check-if-upgrade-is-neededβ Exit with a status code indicating if an upgrade is needed. Returns0if upgrade needed or current version couldn't be determined,1when no action required. (yes, it's backwards from what your brain expects, we don't make the rules π€‘)--datadir=pathβ Old option accepted for backward compatibility but ignored.--debug=path,-# pathβ For debug builds, output debug log.--debug-checkβ Print some debugging information when the program exits.--debug-info,-Tβ Print debugging information and memory and CPU usage statistics when the program exits.--default-character-set=nameβ Old option accepted for backward compatibility but ignored.--forceβ Ignore themariadb-upgrade_infofile and force execution of mariadb-check even if mariadb-upgrade has already been executed for the current version of MariaDB.--hostβ Connect to MariaDB on the given host.--password[=password],-p[password]β The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the--passwordor-poption on the command line, mariadb-upgrade prompts for one.
Specifying a password on the command line should be considered insecure. You can use an option file to avoid giving the password on the command line. please bestie, use the option file π
--port=port_num,-P port_numβ The TCP/IP port number to use for the connection.--protocol={TCP|SOCKET|PIPE|MEMORY}β The connection protocol to use for connecting to the server. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want.--silentβ Print less information. quiet luxury β¨--socket=path,-S pathβ For connections tolocalhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use.--sslβ Enable SSL for connection (automatically enabled with other flags). Disable with--skip-ssl.--ssl-ca=nameβ CA file in PEM format (check OpenSSL docs, implies--ssl).--ssl-capath=nameβ CA directory (check OpenSSL docs, implies--ssl).--ssl-cert=nameβ X509 cert in PEM format (check OpenSSL docs, implies--ssl).--ssl-cipher=nameβ SSL cipher to use (check OpenSSL docs, implies--ssl).--ssl-key=nameβ X509 key in PEM format (check OpenSSL docs, implies--ssl).--ssl-crl=nameβ Certificate revocation list (check OpenSSL docs, implies--ssl).--ssl-crlpath=nameβ Certificate revocation list path (check OpenSSL docs, implies--ssl).--ssl-verify-server-certβ Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.--tmpdir=path,-t pathβ The path name of the directory to use for creating temporary files.--upgrade-system-tables,-sβ Only upgrade the system tables in themysqldatabase. Tables in other databases are not checked or touched. minimal effort, maximal boundaries π--user=user_name,-u user_nameβ The MariaDB user name to use when connecting to the server and not using the current login.--verboseβ Display more output about the process. Using it twice will print connection arguments; using it 3 times will print out allCHECK,RENAMEandALTER TABLEcommands used during the check phase; using it 4 times (added in MariaDB 10.0.14) will also write out all mariadb-check commands used; using it 5 times will print all the mariadb commands used and their results while runningmariadb-fix-privilege-tablesscript. the more you stack it the more it yaps π£οΈπ₯--version,-Vβ Output version information and exit.--version-check,-kβ Run this program only if its 'server version' matches the version of the server to which it's connecting. Note: the 'server version' of the program is the version of the MariaDB server with which it was built/distributed. Defaults to on; use--skip-version-checkto disable.--write-binlogβ Cause binary logging to be enabled while mariadb-upgrade runs.
π COPYRIGHT π
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2025 MariaDB Foundation
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
π SEE ALSO π
For more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/
π AUTHOR π
MariaDB Foundation (http://www.mariadb.org/).
and that's the whole page, bestie!! this was MariaDB 11.8, dated 5 March 2025, straight from the MARIADB-UPGRADE(1) corner of the universe π¦ go forth and upgrade responsibly, back up first, and hydrate πβ¨
π¦ where this page comes from
- alpine 3.24: mariadb-doc 11.8.9-r0 Β· GPL-2.0-only
- arch rolling: mariadb-clients 13.0.2-2 Β· GPL-2.0-only
- arch rolling: mariadb-lts-clients 12.3.3-2 Β· GPL-2.0-only
- centos-stream 10: mariadb11.8-server 3:11.8.8-1.el10 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- centos-stream 9: mariadb-server 3:11.8.8-1.module_el9+1370+ec5ecc2e Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- debian trixie: mariadb-server-core 1:11.8.6-0+deb13u1 Β· GPL-2.0-only
- fedora 43: mariadb11.8-server 3:11.8.8-1.fc43 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 43: mariadb12.3-server 3:12.3.2-2.fc43 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 44: mariadb-server 3:11.8.6-2.fc44 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 44: mariadb-server 3:11.8.8-3.fc44 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- fedora 44: mariadb12.3-server 3:12.3.2-2.fc44 Β· ( GPL-2.0-only OR Apache-2.0 ) AND ( GPL-2.0-or-later OR Apache-2.0 ) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ( GPL-3.0-or-later WITH Bison-exception-2.2 ) AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OpenSSL AND MIT AND OFL-1.1 AND CC0-1.0 AND PHP-3.0 AND PHP-3.01 AND zlib AND dtoa AND FSFAP AND blessing AND Info-ZIP AND Boehm-GC
- nixpkgs unstable: mariadb-server 11.8.8
- opensuse-leap 16.0: mariadb 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- opensuse-leap 16.0: mariadb 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- opensuse-leap 16.0: mariadb 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- opensuse-leap 16.0: mariadb 11.8.8-160000.1.1 Β· SUSE-GPL-2.0-with-FLOSS-exception
- ubuntu resolute: mariadb-server-core 1:11.8.6-5 Β· GPL-2.0-only
- ubuntu resolute: mariadb-server-core 1:11.8.6-5ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: mariadb-server-compat 1:11.8.9+ds-4ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms