User

User

Description

The user to use to connect to the database.

This can be omitted if the user is baked into the url (See SQL Server for an example).

Usage

Commandline

./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>

Didn't find what you were looking for?