-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to SQLServer when embedding username and password in connection string #3998
Comments
Liquibase doesn't currently support replacing properties in the URL, it only accepts it as a static value. Are you able to remove the username/password from the url? Or is there a reason you need it them there? |
@nvoxland Thing is, I'm using the same database url for my spring boot app's |
@nvoxland also, I'm not attempting to replace the properties in the url, they're static, but even with that it doesn't work, I put the properties in curly braces as an example, didn't mean to cause confusion |
Hello @mistermiracl, sorry for the late response. Would you be willing to submit a PR? Our team would provide you with guidance to help you out if needed. |
Maybe a simple question but don't you need a ${} to get the values evaluated so Or at least that works for me. |
Search first
Description
When running the command to run the migrations on an Azure SQL database
mvn liquibase:update
Having specified a properties file in the pom.xml with the database URL as follows:
url: jdbc:sqlserver://{url}:{port};database={database};username={username};password={password};encrypt=true;trustServerCertificate=false;hostNameInCertificate={hostname};loginTimeout=30;
Liquibase cannot establish a connection, and returns this message:
Login failed for user {username}
Interestingly enough, when booting the app using spring boot's command:
mvn spring-boot:run
, using the exact same connection string, the connection is established and the migrations are executed by liquibase successfully.I should mention that if I specify both
username
andpassword
properties in theliquibase.properties
file the connection is established successfully, however I'm reusing this connection string other places and, unfortunately, I cannot access these other properties from outside.Steps To Reproduce
execute the
update
goal in the liquibase maven plugin with a properties file with the username and password embeded in the url propertyExpected/Desired Behavior
liquibase should be able to connect to the database using with the specified connection string
Liquibase Version
4.9.1
Database Vendor & Version
Azure SQL equivalent to SQLServer 2019
Liquibase Integration
maven
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
Windows
Additional Context
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: