content_image/675404.jpg content_image/675416.jpg
<img src='content_image/675404.jpg'>

## Note 

Per the HashiCorp documentation, all API routes are prefixed with a protocol version (which you can see in the preceding example as /v1/  in the keyring_hashicorp_store_path  and keyring_hashicorp_auth_path values). If HashiCorp develops new protocol versions, it may be necessary to change /v1/  to something else in your configuration. 

MySQL Server authenticates against HashiCorp Vault using AppRole authentication. Successful authentication requires that two secrets be provided to Vault, a role ID and a secret ID, which are similar in concept to user name and password. The role ID and secret ID values to use are those obtained during the HashiCorp Vault setup procedure performed previously. To specify the two IDs, assign their respective values to the keyring_hashicorp_role_id  and keyring_hashicorp_secret_id  system variables. The setup procedure also results in a store path of /v1/kv/mysql , which is the value to assign to keyring_hashicorp_commit_store_path . 

At plugin initialization time, keyring_hashicorp  attempts to connect to the HashiCorp Vault server using the configuration values. If the connection is successful, the plugin stores the values in corresponding system variables that have _commit_  in their name. For example, upon successful connection, the plugin stores the values of keyring_hashicorp_role_id  and keyring_hashicorp_store_path  in keyring_hashicorp_commit_role_id  and keyring_hashicorp_commit_store_path . 

Reconfiguration at runtime can be performed with the assistance of the keyring_hashicorp_update_config()  function: 

1. Use SET  statements to assign the desired new values to the configuration system variables shown in the preceding table. These assignments in themselves have no effect on ongoing plugin operation. 

2. Invoke keyring_hashicorp_update_config()  to cause the plugin to reconfigure and reconnect to the HashiCorp Vault server using the new variable values. 

3. If the connection is successful, the plugin stores the updated configuration values in corresponding system variables that have _commit_  in their name. 

For example, if you have reconfigured HashiCorp Vault to listen on port 8201 rather than the default 8200, reconfigure keyring_hashicorp  like this: 

mysql> SET GLOBAL keyring_hashicorp_server_url = ’https://127.0.0.1:8201’; Query OK, 0 rows affected (0.00 sec) mysql> SELECT keyring_hashicorp_update_config(); +--------------------------------------+ | keyring_hashicorp_update_config() | +--------------------------------------+ | Configuration update was successful. | +--------------------------------------+ 1 row in set (0.03 sec) 

If the plugin is not able to connect to HashiCorp Vault during initialization or reconfiguration and there was no existing connection, the _commit_  system variables are set to ’Not committed’  for string- valued variables, and OFF  for Boolean-valued variables. If the plugin is not able to connect but there was an existing connection, that connection remains active and the _commit_  variables reflect the values used for it. 

<img src='content_image/675416.jpg'>

## Note 

If you do not set the mandatory system variables at server startup, or if some other plugin initialization error occurs, initialization fails. In this case, you can use the 

