Utility Scripts¶
This page describes Galera Cluster utility scripts.
wsrep_recover Script
The wsrep_recover
utility script simplifies cluster recovery procedures. The script recovers the database to a consistent state, finds the last committed GTID on a crashed or stopped node, and prints the corresponding --wsrep-start-position
option to the standard output, to be used in startup scripts.
Usage:
sudo wsrep_recover [options]
The script options are mostly passed through directly to mysqld
. However, some options have a special meaning. The options are:
--basedir /x/y/z
- This option additionally setsmysqld
binary path to/x/y/z/bin/mysqld
.--mysqld /x/y/z/mysqld
- This option overrides the--basedir
effect on the mysqld binary path.
Note
Notice the whitespace between the option name and the value.
An example:
sudo wsrep_recover --mysqld /path/to/mysqld --datadir /path/to/datadir --user some_user
By default, the mysqld
binary is expected to be found at ‘/usr/sbin/mysqld’ and will be run as ‘mysql’ user, using the configuration file from the standard location.
This utility script was introduced on version 8.0.27, and was backported to version 5.7.40.
See also wsrep option wsrep_recover.