MYSQL_MIGRATE_KEYRING(1)
๐ธ NAME ๐ธ
mysql_migrate_keyring โ keyring key migration utility. This is the MYSQL_MIGRATE_KEYRING(1) manual page from the MySQL Database System, bestie, and we're gonna make key migration make sense. ๐
โจ SYNOPSIS โจ
mysql_migrate_keyring [options]
๐ DESCRIPTION ๐
Okay so mysql_migrate_keyring is the utility that migrates keys between one keyring component and another. It supports offline and online migrations. Slay. โจ
Invoke it like this โ and yes, enter the command on a single line, bestie:
mysql_migrate_keyring
--component-dir=dir_name
--source-keyring=name
--destination-keyring=name
[other options]
For information about key migrations and instructions describing how to perform them using mysql_migrate_keyring and other methods, see Section 8.4.4.14, โMigrating Keys Between Keyring Keystoresโ.
mysql_migrate_keyring supports the following options, which can be specified on the command line or in the [mysql_migrate_keyring] group of an option file. For information about option files used by MySQL programs, see Section 6.2.2.2, โUsing Option Filesโ.
๐ OPTIONS ๐
--help,-hโ displays a help message and exits. That's it, that's the whole vibe. ๐- Command-line format:
--help
- Command-line format:
--component-dir=dir_nameโ the directory where keyring components are located, bestie. This is typically the value of theplugin_dirsystem variable for the local MySQL server. ๐- Command-line format:
--component-dir=dir_name - Type: Directory name
- Command-line format:
โ ๏ธ Note:--component-dir,--source-keyring, and--destination-keyringare mandatory for all keyring migration operations performed bymysql_migrate_keyring. In addition, the source and destination components must differ, and both components must be properly configured so thatmysql_migrate_keyringcan load and use them.
--defaults-extra-file=file_nameโ reads this option file after the global option file but (on Unix) before the user option file. If the file does not exist or is otherwise inaccessible, an error occurs. Iffile_nameis not an absolute path name, it is interpreted relative to the current directory. ๐๏ธ- Command-line format:
--defaults-extra-file=file_name - Type: File name For additional information about this and other option-file options, see Section 6.2.2.3, โCommand-Line Options that Affect Option-File Handlingโ.
- Command-line format:
--defaults-file=file_nameโ use only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs. Iffile_nameis not an absolute path name, it is interpreted relative to the current directory. ๐- Command-line format:
--defaults-file=file_name - Type: File name
- Command-line format:
Exception, bestie: even with--defaults-file, client programs read.mylogin.cnf.
For additional information about this and other option-file options, see Section 6.2.2.3, โCommand-Line Options that Affect Option-File Handlingโ.
--defaults-group-suffix=strโ reads not only the usual option groups, but also groups with the usual names and a suffix ofstr. For example,mysql_migrate_keyringnormally reads the[mysql_migrate_keyring]group. If this option is given as--defaults-group-suffix=_other,mysql_migrate_keyringalso reads the[mysql_migrate_keyring_other]group. ๐- Command-line format:
--defaults-group-suffix=str - Type: String For additional information about this and other option-file options, see Section 6.2.2.3, โCommand-Line Options that Affect Option-File Handlingโ.
- Command-line format:
--destination-keyring=nameโ the destination keyring component for key migration. The format and interpretation of the option value is the same as described for the--source-keyringoption. ๐ฏ- Command-line format:
--destination-keyring=name - Type: String
- Command-line format:
โ ๏ธ Note:--component-dir,--source-keyring, and--destination-keyringare mandatory for all keyring migration operations performed bymysql_migrate_keyring. In addition, the source and destination components must differ, and both components must be properly configured so thatmysql_migrate_keyringcan load and use them.
--destination-keyring-configuration-dir=dir_nameโ this option applies only if the destination keyring component global configuration file contains"read_local_config": true, indicating that component configuration is contained in the local configuration file. The option value specifies the directory containing that local file. ๐- Command-line format:
--destination-keyring-configuration-dir=dir_name - Type: Directory name
- Command-line format:
--get-server-public-keyโ requests from the server the public key required for RSA key pair-based password exchange. This option applies to clients that authenticate with thecaching_sha2_passwordauthentication plugin. For that plugin, the server does not send the public key unless requested. This option is ignored for accounts that do not authenticate with that plugin. It is also ignored if RSA-based password exchange is not used, as is the case when the client connects to the server using a secure connection. ๐- Command-line format:
--get-server-public-key - Type: Boolean If
--server-public-key-path=file_nameis given and specifies a valid public key file, it takes precedence over--get-server-public-key. For information about thecaching_sha2_passwordplugin, see Section 8.4.1.2, โCaching SHA-2 Pluggable Authenticationโ.
- Command-line format:
--host=host_name,-h host_nameโ the host location of the running server that is currently using one of the key migration keystores. Migration always occurs on the local host, so the option always specifies a value for connecting to a local server, such aslocalhost,127.0.0.1,::1, or the local host IP address or host name. ๐ฅ๏ธ- Command-line format:
--host=host_name - Type: String
- Default value:
localhost
- Command-line format:
--login-path=nameโ the login path option, with the command-line format and type below. ๐- Command-line format:
--login-path=name - Type: String
- Command-line format:
Still on --login-path for like two more seconds, bestie: it reads options from the login path you named inside the .mylogin.cnf login path file. And a "login path" is just an option group holding the options that say which MySQL server to connect to and which account to authenticate as. To create or modify a login path file, use the mysql_config_editor utility โ see mysql_config_editor(1).
And for extra info about this and other option-file options, peek at Section 6.2.2.3, โCommand-Line Options that Affect Option-File Handlingโ.
Okay, moving on, the actual list continues ๐
--no-login-pathsโ skips reading options from the login path file, periodt. See--login-pathfor the related tea โจ- Command-Line Format:
--no-login-paths - For additional information about this and other option-file options, see Section 6.2.2.3, โCommand-Line Options that Affect Option-File Handlingโ.
- Command-Line Format:
--no-defaultsโ do NOT read any option files, literally none. If program startup is failing because it's reading unknown options out of an option file,--no-defaultsis your bestie for stopping them from being read at all.- Command-Line Format:
--no-defaults - The exception (because of course there's an exception ๐ซ ): the
.mylogin.cnffile is read in all cases, if it exists. This permits passwords to be specified in a safer way than on the command line even when--no-defaultsis used. To create.mylogin.cnf, use themysql_config_editorutility. Seemysql_config_editor(1). - For additional information about this and other option-file options, see Section 6.2.2.3, โCommand-Line Options that Affect Option-File Handlingโ.
- Command-Line Format:
--online-migrationโ this one is mandatory when a running server is using the keyring. It tellsmysql_migrate_keyringto perform an online key migration. The option has these effects:- Command-Line Format:
--online-migration - Type:
Boolean - Default Value:
FALSE mysql_migrate_keyringconnects to the server using any connection options specified; these options are otherwise ignored.- After
mysql_migrate_keyringconnects to the server, it tells the server to pause keyring operations. When key copying is complete,mysql_migrate_keyringtells the server it can resume keyring operations before disconnecting. Iconic behavior honestly ๐
- Command-Line Format:
--password[=password],-p[password]โ the password of the MySQL account used for connecting to the running server that is currently using one of the key migration keystores.- Command-Line Format:
--password[=password] - Type:
String - The password value is optional. If not given,
mysql_migrate_keyringprompts for one. If given, there must be no space between--password=or-pand the password following it. If no password option is specified, the default is to send no password. - > Specifying a password on the command line should be considered insecure, no cap ๐ฌ. To avoid giving the password on the command line, use an option file. See Section 8.1.2.1, โEnd-User Guidelines for Password Securityโ.
- To explicitly specify that there is no password and that
mysql_migrate_keyringshould not prompt for one, use the--skip-passwordoption.
- Command-Line Format:
--port=port_num,-P port_numโ for TCP/IP connections, the port number for connecting to the running server that is currently using one of the key migration keystores.- Command-Line Format:
--port=port_num - Type:
Numeric - Default Value:
0
- Command-Line Format:
--print-defaultsโ print the program name and all options that it gets from option files. That's the whole vibe ๐- Command-Line Format:
--print-defaults - For additional information about this and other option-file options, see Section 6.2.2.3, โCommand-Line Options that Affect Option-File Handlingโ.
- Command-Line Format:
--server-public-key-path=file_nameโ the path name to a file in PEM format containing a client-side copy of the public key required by the server for RSA key pair-based password exchange.- Command-Line Format:
--server-public-key-path=file_name - Type:
File name - This option applies to clients that authenticate with the
sha256_passwordorcaching_sha2_passwordauthentication plugin. This option is ignored for accounts that do not authenticate with one of those plugins. It is also ignored if RSA-based password exchange is not used, as is the case when the client connects to the server using a secure connection. - If
--server-public-key-path=file_nameis given and specifies a valid public key file, it takes precedence over--get-server-public-key. - For
sha256_password, this option applies only if MySQL was built using OpenSSL. - For information about the
sha256_passwordandcaching_sha2_passwordplugins, see Section 8.4.1.3, โSHA-256 Pluggable Authenticationโ, and Section 8.4.1.2, โCaching SHA-2 Pluggable Authenticationโ.
- Command-Line Format:
--socket=path,-S pathโ for Unix socket file or Windows named pipe connections, the socket file or named pipe for connecting to the running server that is currently using one of the key migration keystores.- Command-Line Format:
--socket={file_name|pipe_name} - Type:
String - On Windows, this option applies only if the server was started with the
named_pipesystem variable enabled to support named-pipe connections. In addition, the user making the connection must be a member of the Windows group specified by thenamed_pipe_full_access_groupsystem variable. Windows girlies stay having extra rules, we love that for them ๐ช
- Command-Line Format:
--source-keyring=nameโ the source keyring component for key migration. This is the component library file name specified without any platform-specific extension such as.soor.dll. For example, to use the component for which the library file iscomponent_keyring_file.so, specify the option as--source-keyring=component_keyring_file.- Command-Line Format:
--source-keyring=name - Type:
String - > Note:
--component-dir,--source-keyring, and--destination-keyringare mandatory for all keyring migration operations performed bymysql_migrate_keyring. In addition, the source and destination components must differ, and both components must be properly configured so thatmysql_migrate_keyringcan load and use them. Like, no shortcuts, bestie ๐
- Command-Line Format:
--source-keyring-configuration-dir=dir_name- Command-Line Format:
--source-keyring-configuration-dir=dir_name - Type: Directory name
- Command-Line Format:
Okay so this one only does anything if the source keyring component's global config file has "read_local_config": true in it โ that's the flag saying "hey, my real settings live in the local config file." When that's the case, this option tells the program which directory that local file is chillin' in. That's it, that's the whole vibe. ๐
--ssl*โ any option starting with--sslis about whether you connect to the server with encryption, plus where to find your SSL keys and certificates. For the full rundown, peep the section called "Command Options for Encrypted Connections." ๐--ssl-fips-mode={OFF|ON|STRICT}- Command-Line Format:
--ssl-fips-mode={OFF|ON|STRICT} - Deprecated: Yes
- Type: Enumeration
- Default Value:
OFF - Valid Values:
OFF,ON,STRICT
- Command-Line Format:
This bad boy controls whether FIPS mode is turned on for the client side. And here's the tea: --ssl-fips-mode is not like the other --ssl-xxx options, because it doesn't establish encrypted connections โ it changes which cryptographic operations are allowed. See Section 8.8, "FIPS Support." ๐ง
These values are permitted:
OFF: disable FIPS mode.ON: enable FIPS mode.STRICT: enable "strict" FIPS mode.
Note: if the OpenSSL FIPS Object Module isn't available, the only permitted value for--ssl-fips-modeisOFF. In that case, setting it toONorSTRICTmakes the client throw a warning at startup and just operate in non-FIPS mode anyway. ๐
Heads up, bestie: this option is deprecated. Expect it to be gone in a future version of MySQL. ๐ญ
--tls-ciphersuites=ciphersuite_list- Command-Line Format:
--tls-ciphersuites=ciphersuite_list - Type: String
- Command-Line Format:
These are the permissible ciphersuites for encrypted connections using TLSv1.3. The value is a list of one or more colon-separated ciphersuite names. Which ciphersuites you can actually name here depends on the SSL library MySQL was compiled with. For the details, see Section 8.3.2, "Encrypted Connection TLS Protocols and Ciphers." โจ
--tls-sni-servername=server_name- Command-Line Format:
--tls-sni-servername=server_name - Type: String
- Command-Line Format:
When you specify this, the name gets passed to the libmysqlclient C API library using the MYSQL_OPT_TLS_SNI_SERVERNAME option of mysql_options(). The server name is not case-sensitive. Wanna see which server name the client specified for the current session, if any? Check the Tls_sni_server_name status variable. ๐
Server Name Indication (SNI) is an extension to the TLS protocol โ and btw, OpenSSL must be compiled using TLS extensions for this option to actually function. The MySQL implementation of SNI represents the client side only, iykyk. ๐ฆ
--tls-version=protocol_list- Command-Line Format:
--tls-version=protocol_list - Type: String
- Default Value:
TLSv1,TLSv1.1,TLSv1.2,TLSv1.3(OpenSSL 1.1.1 or higher)TLSv1,TLSv1.1,TLSv1.2(otherwise)
- Command-Line Format:
The permissible TLS protocols for encrypted connections. The value is a list of one or more comma-separated protocol names. Which protocols you can name depends on the SSL library MySQL was compiled with. For the details, see Section 8.3.2, "Encrypted Connection TLS Protocols and Ciphers." ๐
--user=user_name,-u user_name- Command-Line Format:
--user=user_name - Type: String
- Command-Line Format:
The user name of the MySQL account used to connect to the running server that's currently using one of the key migration keystores. That's your login, bestie. ๐
--verbose,-v- Command-Line Format:
--verbose
- Command-Line Format:
Verbose mode, aka the "tell me everything" era. Produces more output about what the program's actually doing. Obsessed, honestly. ๐
--version,-V- Command-Line Format:
--version
- Command-Line Format:
Display version information and then dip out. Short and sweet. ๐
๐ COPYRIGHT ๐
Copyright ยฉ 1997, 2024, Oracle and/or its affiliates.
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-1301 USA or see http://www.gnu.org/licenses/. ๐
๐ SEE ALSO ๐
For more information, please refer to the MySQL Reference Manual โ which may already be installed locally, and which is also available online at http://dev.mysql.com/doc/. Go read it, it's giving encyclopedia but make it slay. ๐ธ
๐ AUTHOR ๐
Oracle Corporation (http://dev.mysql.com/). ๐ขโจ
Bestie, that's the whole page!! You made it to the end of the group chat ๐ โ this iconic piece of documentation is from MySQL 8.4, dated 03/11/2024. Now go migrate those keyrings, no cap. ๐ ๐ฆโญ
๐ฆ where this page comes from
- nixos 26.05: percona-xtrabackup 8.4.0-4
- nixpkgs unstable: percona-xtrabackup 8.4.0-7
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms