documentation/Reference/Configuration/Environments Namespace/Environment Password Setting.md
The password to use to connect to the database
This can be omitted if the password is baked into the url (See SQL Server for an example), or if password is provided through another means (such as aws secrets).
String
<i>none</i>
This can be set from the connection dialog.
./flyway -password=mysecretpassword info
To configure a named environment via command line when using a TOML configuration, prefix password with environments.{environment name}. for example:
./flyway -environments.sample.password=mysecretpassword info
[environments.default]
password = "mysecretpassword"
flyway.password=mysecretpassword
FLYWAY_PASSWORD=mysecretpassword
When using the Java API, you configure your JDBC URL, User and Password via a datasource.
Flyway.configure()
.datasource("jdbc:h2:mem:flyway_db", "myuser", "mysecretpassword")
.load()
flyway {
password = 'mysecretpassword'
}
<configuration>
<password>mysecretpassword</password>
</configuration>