Password
Published 31 October 2023
Password
Description
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).
Usage
Commandline
./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
TOML Configuration File
[environments.default]
password = "mysecretpassword"
Configuration File
flyway.password=mysecretpassword
Environment Variable
FLYWAY_PASSWORD=mysecretpassword
API
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()
Gradle
flyway {
password = 'mysecretpassword'
}
Maven
<configuration>
<password>mysecretpassword</password>
</configuration>