vault write demo-db/config/demo-db \
plugin_name=mysql-database-plugin
allowed_roles=“dev-mysql”
connection_url=“mysql://{{username}}:{{password}}@mysql:3306/vaulttest?useSSL=false”
username=“myuser”
password=“password”
Error writing data to demo-db/config/demo-db: Error making API request.
URL: PUT http://127.0.0.1:8200/v1/demo-db/config/demo-db
Code: 400. Errors:
- error creating database object: error verifying - connection: unable to parse connectionURL: default addr for network ‘mysql:3306’ unknown
Is mysql:3306
a valid address for Vault to connect to your MySQL instance?
Yes. mysql pod is running and name of service is mysql.
example: mysql.mysql.svc.cluster.local:3306
Have you tried the complete URL, mysql.mysql.svc.cluster.local:3306
not just mysql:3306
? I obviously don’t have insight into name resolution in your environment.
If you can access one of the Vault nodes, you an confirm name resolution from that node to the MySQL node.
Same vault is deployed through MYSQL backed. I just try to test store Mysql secret for testing purpose.