Environment User Setting
Published 15 January 2025
Description
The user to use to connect to the database.
Type
String
Default
none
Usage
Flyway Desktop
This can be set from the connection dialog.
Command-line
./flyway -user=myuser info
To configure a named environment via command line when using a TOML configuration, prefix user
with environments.{environment name}.
for example:
./flyway -environments.sample.user=myuser info
TOML Configuration File
[environments.default]
user = "myuser"
Configuration File
flyway.user=myuser
Environment Variable
FLYWAY_USER=myuser
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 {
user = 'myuser'
}
Maven
<configuration>
<user>myuser</user>
</configuration>