mysqlctl is a command-line tool used for starting mysqld binaries. It is responsible for bootstrapping tasks such as generating a configuration file for mysqld and ensuring that mysql_upgrade is run in the data directory when restoring from backup.
mysqld_safe will be also be utilized when present. This helps ensure that mysqld is automatically restarted after failures.
Regenerate new configuration files for an existing mysqld instance. This could be helpful to revert configuration changes, or to pick up changes made to the bundled config in newer Vitess versions. For example:
The following global parameters apply to mysqlctl:
log to standard error as well as files
Idle timeout for app connections (default 1m0s)
Size of the connection pool for app connections (default 40)
Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin")
if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000)
if set, the backup files will be compressed (default is true). Set to false for instance if a backup_storage_hook is specified and it compresses the data. (default true)
if set, we send the contents of the backup files through this hook.
which implementation to use for the backup storage feature
if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression (default 2)
write cpu profile to file
host to send spans to. if empty, no tracing will be done
port to send spans to. if empty, no tracing will be done
db credentials file; send SIGHUP to reload this file
db credentials server type (use 'file' for the file implementation) (default "file")
Character set. Only utf8 or latin1 based character sets are supported.
connection timeout to mysqld in milliseconds (0 for no timeout)
db dba password
Set this flag to false to make the dba connection to not use ssl (default true)
db dba user userKey (default "vt_dba")
Flag values as defined by MySQL.
Flavor overrid. Valid value is FilePos.
The host name for the tcp connection.
server name of the DB we are connecting to.
The unix socket to connect on. If this is specified, host and port will not be used.
connection ssl ca
connection ssl ca path
connection ssl certificate
connection ssl key
Idle timeout for dba connections (default 1m0s)
Size of the connection pool for dba connections (default 20)
if set, do not allow active reparents. Use this to protect a cluster using external reparents.
true iff we should emit stats to push-based monitoring/stats backends
Which auth plugin implementation to use (eg: static)
List of substrings of at least one of the client certificate names (separated by colon).
when using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server
JSON File to read the users/passwords from.
ca to use, requires TLS, and enforces client cert check
certificate to use, requires grpc_key, enables TLS
how to compress gRPC, default: nothing, supported: snappy
Enable GRPC tracing
grpc initial connection window size
grpc initial window size
After a duration of this time, if the client doesn't see any activity, it pings the server to see if the transport is still alive. (default 10s)
After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s)
key to use, requires grpc_cert, enables TLS
Maximum age of a client connection before GoAway is sent. (default 2562047h47m16.854775807s)
Additional grace period after grpc_max_connection_age, after which connections are forcibly closed. (default 2562047h47m16.854775807s)
Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216)
Delay after which buffered response will be flushed to the client. (default 100ms)
path to the mysql socket
the protocol to use to talk to the mysqlctl server (default "grpc")
template file to use for generating the my.cnf file during server init
socket file to use for remote mysqlctl actions (empty for local actions)
wait no more than this for OnTermSync handlers before stopping (default 10s)
If set, the process will write its pid to the named file, and delete it on graceful shutdown.
if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled)
vttablet port (default 6612)
how often try to remove old logs (default 1h0m0s)
time to wait for a remote operation (default 30s)
the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice
truncate queries in error logs to the given length (default unlimited)
truncate queries in debug UIs to the given length (default 512) (default 512)
The name of the registered push-based monitoring/stats backend to use
List of dimensions to be combined into a single "all" value in exported stats vars
Variables to be dropped from the list of exported variables.
Interval between emitting stats to all registered backends (default 1m0s)
logs at or above this threshold go to stderr (default 1)
The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid.
the protocol to use to talk to vttablet (default "grpc")
tablet uid (default 41983)
the path of the global topology data in the global topology server
the address of the global topology server
the topology implementation to use
tracing service to use (default "noop")
sampling rate for the probabilistic jaeger sampler (default 0.1)
log level for V logs
print binary version
comma-separated list of pattern=N settings for file-filtered logging
flags to pass to xbstream command during restore. These should be space separated and will be added to the end of the command. These need to match the ones used for backup e.g. --compress / --decompress, --encrypt / --decrypt
flags to pass to backup command. These should be space separated and will be added to the end of the command
flags to pass to prepare command. These should be space separated and will be added to the end of the command
directory location of the xtrabackup executable, e.g., /usr/bin
which mode to use if streaming, valid values are tar and xbstream (default "tar")
Size in bytes of each block that gets sent to a given stripe before rotating to the next stripe (default 102400)
If greater than 0, use data striping across this many destination files to parallelize data transfer and decompression
User that xtrabackup will use to connect to the database server. This user must have all necessary privileges. For details, please refer to xtrabackup documentation.