Commands
CREATE SECRET
Use the CREATE SECRET
command to create secrets to store sensitive credentials securely.
Syntax
Parameters
Parameter or Clause | Description |
---|---|
secret_name | The name of the secret to be created. This should be a unique identifier within the system. |
backend | Specifies the backend where the secret will be stored. Currently, only the meta backend is supported. |
your_secret | The secret value that you wish to store securely. |
Examples
Here is an example. We create a secret named mysql_pwd
, and then use it in the WITH
clause. After that, we use the SHOW CREATE SOURCE
command to view the password. As shown in the result, the MySQL password is hidden, ensuring no secret leaks.
See also
Was this page helpful?