mariadb-upgrade & mysql_upgrade for MariaDB Enterprise Server 10.2


The mysql_upgrade utility examines the data directory for incompatibilities with MariaDB Enterprise Server 10.2. It performs tasks, such as:

  • Upgrades the system tables to support any new features.

  • Attempts to repair tables with incompatibilities.

Problems can sometimes occur during upgrades. When problems occur, you may need to restore the system from a backup or reload the data from its system of record. Prior to upgrading, it is recommended to perform a backup or ensure that the system of record is available.

MariaDB Enterprise Server 10.2 does not provide a symbolic link to the utility's new name (mariadb-upgrade), so the legacy name must be used.

mysql_upgrade Options for MariaDB Enterprise Server 10.2



--basedir (-b)

Not used by mysql_upgrade. Only for backward compatibility.


Not used by mysql_upgrade. Only for backward compatibility.


Exits with status 0 if an upgrades is required, 1 otherwise.


Not used by mysql_upgrade. Only for backward compatibility.

--datadir (-d)

Not used by mysql_upgrade. Only for backward compatibility.

--debug (-#)

This is a non-debug version. Catch this and exit.


Check memory and open file usage at exit.

--debug-info (-T)

Print some debug info at exit.


Default authentication client-side plugin to use.


Not used by mysql_upgrade. Only for backward compatibility.


Read this file after the global files are read.


Only read default options from the given file #.


Additionally read default groups with # appended as a suffix.

--force (-f)

Force execution of mysqlcheck even if mysql_upgrade has already been executed for the current version of MariaDB.

--help (-?)

Display this help message and exit.

--host (-h)

Connect to host.


Don't read default options from any option file.

--password (-p)

Password to use when connecting to server. If password is not given, it's solicited on the tty.


Directory for client-side plugins.

--port (-P)

Port number to use for connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306).


Print the program argument list and exit.


The protocol to use for connection (tcp, socket, pipe, memory).


Print less information

--socket (-S)

The socket file to use for connection.


Enable SSL for connection (automatically enabled with other flags).


CA file in PEM format (check OpenSSL docs, implies --ssl).


CA directory (check OpenSSL docs, implies --ssl).


X509 cert in PEM format (implies --ssl).


SSL cipher to use (implies --ssl).


Certificate revocation list (implies --ssl).


Certificate revocation list path (implies --ssl).


X509 key in PEM format (implies --ssl).


Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.

--tmpdir (-t)

Directory for temporary files.

--upgrade-system-tables (-s)

Only upgrade the system tables in the mysql database. Tables in other databases are not checked or touched.

--user (-u)

User for login.

--verbose (-v)

Display more output about the process; Using it twice will print connection argument; Using it 3 times will print out all CHECK, RENAME and ALTER TABLE during the check phase. (Defaults to on; use --skip-verbose to disable.)

--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-check to disable.)


All commands including those issued by mysqlcheck are written to the binary log.

To see options supported in other versions, see "mariadb-upgrade & mysql_upgrade Options by MariaDB Server Version".