MARIADB-UPGRADE(1) | MariaDB Database System | MARIADB-UPGRADE(1) |
NAME
mariadb-upgrade - check tables for MariaDB upgrade (mariadb-upgrade is now a symlink to mariadb-upgrade)
SYNOPSIS
mariadb-upgrade [options]
DESCRIPTION
mariadb-upgrade examines all tables in all databases for incompatibilities with the current version of the MariaDB Server. mariadb-upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added.
mariadb-upgrade should be executed each time you upgrade MariaDB.
If a table is found to have a possible incompatibility, mariadb-upgrade performs a table check. If any problems are found, a table repair is attempted.
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.
Caution
You should always back up your current MariaDB installation before performing an upgrade.
To use mariadb-upgrade, make sure that 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 take effect.
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:
All checked and repaired tables are marked with the current MariaDB version number. This ensures that next time you run mariadb-upgrade with the same version of the server, it can tell whether there is any need to check or repair the table again.
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.
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.
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.
Display a short help message and exit.
Old option accepted for backward compatibility but ignored.
Old option accepted for backward compatibility but ignored.
Exit with a status code indicating if an upgrade is needed. Returns 0 if upgrade needed or current version couldn't be determined, 1 when no action required.
Old option accepted for backward compatibility but ignored.
For debug builds, output debug log.
Print some debugging information when the program exits.
Print debugging information and memory and CPU usage statistics when the program exits.
Old option accepted for backward compatibility but ignored.
Ignore the mariadb-upgrade_info file and force execution of mariadb-check even if mariadb-upgrade has already been executed for the current version of MariaDB.
Connect to MariaDB on the given host.
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 --password or -p option 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.
The TCP/IP port number to use for the connection.
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.
Print less information.
For connections to localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use.
Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl.
CA file in PEM format (check OpenSSL docs, implies --ssl).
CA directory (check OpenSSL docs, implies --ssl).
X509 cert in PEM format (check OpenSSL docs, implies --ssl).
SSL cipher to use (check OpenSSL docs, implies --ssl).
X509 key in PEM format (check OpenSSL docs, implies --ssl).
Certificate revocation list (check OpenSSL docs, implies --ssl).
Certificate revocation list path (check OpenSSL docs, implies --ssl).
Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.
The path name of the directory to use for creating temporary files.
Only upgrade the system tables in the mysql database. Tables in other databases are not checked or touched.
The MariaDB user name to use when connecting to the server and not using the current login.
Display more output about the process. Using it twice will print connection arguments; using it 3 times will print out all CHECK, RENAME and ALTER TABLE commands 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 running mariadb-fix-privilege-tables script.
Output version information and exit.
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-check to disable.
Cause binary logging to be enabled while mariadb-upgrade runs.
COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2024 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 Knowledge Base, available online at https://mariadb.com/kb/
AUTHOR
MariaDB Foundation (http://www.mariadb.org/).
3 September 2024 | MariaDB 11.4 |