1MARIADB-UPGRADE(1)          MariaDB Database System         MARIADB-UPGRADE(1)
2
3
4

NAME

6       mariadb-upgrade - check tables for MariaDB upgrade (mysql_upgrade is
7       now a symlink to mariadb-upgrade)
8

SYNOPSIS

10       mysql_upgrade [options]
11

DESCRIPTION

13       mysql_upgrade examines all tables in all databases for
14       incompatibilities with the current version of the MariaDB Server.
15       mysql_upgrade also upgrades the system tables so that you can take
16       advantage of new privileges or capabilities that might have been added.
17
18       mysql_upgrade should be executed each time you upgrade MariaDB.
19
20       If a table is found to have a possible incompatibility, mysql_upgrade
21       performs a table check. If any problems are found, a table repair is
22       attempted.
23
24           Note
25           On Windows Server 2008 and Windows Vista, you must run
26           mysql_upgrade with administrator privileges. You can do this by
27           running a Command Prompt as Administrator and running the command.
28           Failure to do so may result in the upgrade failing to execute
29           correctly.
30
31           Caution
32           You should always back up your current MariaDB installation before
33           performing an upgrade.
34
35       To use mysql_upgrade, make sure that the server is running, and then
36       invoke it like this:
37
38           shell> mysql_upgrade [options]
39
40       After running mysql_upgrade, stop the server and restart it so that any
41       changes made to the system tables take effect.
42
43       mysql_upgrade executes the following commands to check and repair
44       tables and to upgrade the system tables:
45
46           mysqlcheck --all-databases --check-upgrade --auto-repair
47           mysql < fix_priv_tables
48           mysqlcheck --all-databases --check-upgrade --fix-db-names --fix-table-names
49
50       Notes about the preceding commands:
51
52       •   Because mysql_upgrade invokes mysqlcheck with the --all-databases
53           option, it processes all tables in all databases, which might take
54           a long time to complete. Each table is locked and therefore
55           unavailable to other sessions while it is being processed. Check
56           and repair operations can be time-consuming, particularly for large
57           tables.
58
59       •   For details about what checks the --check-upgrade option entails,
60           see the description of the FOR UPGRADE option of the CHECK TABLE
61           statement.
62
63fix_priv_tables represents a script generated internally by
64           mysql_upgrade that contains SQL statements to upgrade the tables in
65           the mysql database.
66
67       All checked and repaired tables are marked with the current MariaDB
68       version number. This ensures that next time you run mysql_upgrade with
69       the same version of the server, it can tell whether there is any need
70       to check or repair the table again.
71
72       mysql_upgrade also saves the MariaDB version number in a file named
73       mysql_upgrade_info in the data directory. This is used to quickly check
74       whether all tables have been checked for this release so that
75       table-checking can be skipped. To ignore this file and perform the
76       check regardless, use the --force option.
77
78       For this reason, mysql_upgrade needs to be run as a user with write
79       access to the data directory.
80
81       If you install MariaDB from RPM packages on Linux, you must install the
82       server and client RPMs.  mysql_upgrade is included in the server RPM
83       but requires the client RPM because the latter includes mysqlcheck.
84
85       mysql_upgrade supports the following options, which can be specified on
86       the command line or in the [mysql_upgrade] and [client] option file
87       groups. Other options are passed to mysqlcheck. For example, it might
88       be necessary to specify the --password[=password] option.
89       mysql_upgrade also supports the options for processing option files.
90
91--help, -?
92
93           Display a short help message and exit.
94
95--basedir=path
96
97           Old option accepted for backward compatibility but ignored.
98
99--character-sets-dir=path
100
101           Old option accepted for backward compatibility but ignored.
102
103--check-if-upgrade-is-needed
104
105           Exit with a status code indicating if an upgrade is needed. Returns
106           0 if upgrade needed or current version couldn't be determined, 1
107           when no action required.
108
109--datadir=path
110
111           Old option accepted for backward compatibility but ignored.
112
113--debug=path, -# path
114
115           For debug builds, output debug log.
116
117--debug-check
118
119           Print some debugging information when the program exits.
120
121--debug-info, -T
122
123           Print debugging information and memory and CPU usage statistics
124           when the program exits.
125
126--default-character-set=name
127
128           Old option accepted for backward compatibility but ignored.
129
130--force
131
132           Ignore the mysql_upgrade_info file and force execution of
133           mysqlcheck even if mysql_upgrade has already been executed for the
134           current version of MariaDB.
135
136--host
137
138           Connect to MariaDB on the given host.
139
140--password[=password], -p[password]
141
142           The password to use when connecting to the server. If you use the
143           short option form (-p), you cannot have a space between the option
144           and the password. If you omit the password value following the
145           --password or -p option on the command line, mysql_upgrade prompts
146           for one.
147
148           Specifying a password on the command line should be considered
149           insecure. You can use an option file to avoid giving the password
150           on the command line.
151
152--port=port_num, -P port_num
153
154           The TCP/IP port number to use for the connection.
155
156--protocol={TCP|SOCKET|PIPE|MEMORY}
157
158           The connection protocol to use for connecting to the server. It is
159           useful when the other connection parameters normally would cause a
160           protocol to be used other than the one you want.
161
162--silent
163
164           Print less information.
165
166--socket=path, -S path
167
168           For connections to localhost, the Unix socket file to use, or, on
169           Windows, the name of the named pipe to use.
170
171--ssl
172
173           Enable SSL for connection (automatically enabled with other flags).
174           Disable with --skip-ssl.
175
176--ssl-ca=name
177
178           CA file in PEM format (check OpenSSL docs, implies --ssl).
179
180--ssl-capath=name
181
182           CA directory (check OpenSSL docs, implies --ssl).
183
184--ssl-cert=name
185
186           X509 cert in PEM format (check OpenSSL docs, implies --ssl).
187
188--ssl-cipher=name
189
190           SSL cipher to use (check OpenSSL docs, implies --ssl).
191
192--ssl-key=name
193
194           X509 key in PEM format (check OpenSSL docs, implies --ssl).
195
196--ssl-crl=name
197
198           Certificate revocation list (check OpenSSL docs, implies --ssl).
199
200--ssl-crlpath=name
201
202           Certificate revocation list path (check OpenSSL docs, implies
203           --ssl).
204
205--ssl-verify-server-cert
206
207           Verify server's "Common Name" in its cert against hostname used
208           when connecting. This option is disabled by default.
209
210--tmpdir=path, -t path
211
212           The path name of the directory to use for creating temporary files.
213
214--upgrade-system-tables, -s
215
216           Only upgrade the system tables in the mysql database. Tables in
217           other databases are not checked or touched.
218
219--user=user_name, -u user_name
220
221           The MariaDB user name to use when connecting to the server and not
222           using the current login.
223
224--verbose
225
226           Display more output about the process. Using it twice will print
227           connection arguments; using it 3 times will print out all CHECK,
228           RENAME and ALTER TABLE commands used during the check phase; using
229           it 4 times (added in MariaDB 10.0.14) will also write out all
230           mysqlcheck commands used.
231
232--version, -V
233
234           Output version information and exit.
235
236--version-check, -k
237
238           Run this program only if its 'server version' matches the version
239           of the server to which it's connecting. Note: the 'server version'
240           of the program is the version of the MariaDB server with which it
241           was built/distributed. Defaults to on; use --skip-version-check to
242           disable.
243
244--write-binlog
245
246           Cause binary logging to be enabled while mysql_upgrade runs.
247
249       Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
250       2010-2019 MariaDB Foundation
251
252       This documentation is free software; you can redistribute it and/or
253       modify it only under the terms of the GNU General Public License as
254       published by the Free Software Foundation; version 2 of the License.
255
256       This documentation is distributed in the hope that it will be useful,
257       but WITHOUT ANY WARRANTY; without even the implied warranty of
258       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
259       General Public License for more details.
260
261       You should have received a copy of the GNU General Public License along
262       with the program; if not, write to the Free Software Foundation, Inc.,
263       51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see
264       http://www.gnu.org/licenses/.
265
266

SEE ALSO

268       For more information, please refer to the MariaDB Knowledge Base,
269       available online at https://mariadb.com/kb/
270

AUTHOR

272       MariaDB Foundation (http://www.mariadb.org/).
273
274
275
276MariaDB 10.5                     20 July 2020               MARIADB-UPGRADE(1)
Impressum