You might try putting your arguments into a liquibase.properties file rather than all on the command line and see if that helps. I’m thinking maybe there is an issue with quoting and splitting and parsing. It appears that the system is confused about the databaseName that is in the connection string.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
If Liquibase seems to be ignoring the file, you are doing something incorrectly. It does work - I use that functionality every day. If you can include exactly what you tried, I might be able to help diagnose the issue. Including the argument
–logLevel=DEBUG
in your command line will also cause Liquibase to include more information in its output, and that may be helpful.
The fact that a URL works with SquirrelSQL and not with Liquibase just indicates that they are parsing the URLs differently. They are different code bases after all.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Excellent - glad you got it figured out.
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/
Hi Steve,
Thanks for your response : 1. I have tried using liquibase.properties file. It seems that Liquibase just ignores this file.
- I have tested the URL on SQuirrel and the connection suceeded, why should it be different in Liquibase?
The problem was created by the backslash in Windows operating system.
Thanks.
Trying to find the issue I’m experiencing, this seems to be close to the closest … I’m hoping that someone can tell me what I’m doing wrong… my command is
./liquibase --driver=com.mysql.cj.jdbc.Driver --url=jdbc:mysql://{it’svalid}:3306/db_schema_1?useLegacyDateTimeCcxle=false&serverTimezone=UTC --username={it’svalid} --password={it’svalid} diff --referenceUrl=jdbc:mysql://{it’svalid}:3306/db_schema_2?useLegacyDateTimeCcxle=false&serverTimezone=UTC --referenceUsername={it’svalid} --referencePassword={it’svalid} --changeLogFile=databaseChangeLog.sql
I’m getting this in response:
java -cp “.:/home/someguy/needit/liquibase/liquibase.jar:/home/someguy/needit/liquibase/lib/:/home/someguy/needit/liquibase/lib/jcl-over-slf4j-1.7.25.jar:/home/someguy/needit/liquibase/lib/jul-to-slf4j-1.7.25.jar:/home/someguy/needit/liquibase/lib/log4j-over-slf4j-1.7.25.jar:/home/someguy/needit/liquibase/lib/logback-1.1.jar:/home/someguy/needit/liquibase/lib/logback-classic-1.2.3.jar:/home/tkrueger/needit/liquibase/lib/logback-core-1.2.3.jar:/home/someguy/needit/liquibase/lib/mysql-connector-java-8.0.15.jar:/home/someguy/needit/liquibase/lib/slf4j-api-1.7.25.jar:/home/someguy/needit/liquibase/lib/snakeyaml-1.18.jar” liquibase.integration.commandline.Main “–driver=com.mysql.cj.jdbc.Driver --url=jdbc:mysql://{it’svalid}:3306/db_schema_1 --username={it’svalid} --password={it’svalid} diff --referenceUrl=jdbc:mysql://{it’svalid}:3306/db_schema_2 --referenceUsername={it’svalid} --referencePassword={it’svalid} --changeLogFile=databaseChangeLog.sql”
Starting Liquibase at Thu, 02 May 2019 14:21:56 CDT (version 3.6.3 built at 2019-01-29 11:34:48)
To display the help, please pass the ‘–help’ option on the command line.
Unexpected error running Liquibase: Unexpected value ‘"–driver=com.mysql.cj.jdbc.Driver’ (options must start with a ‘–’)
liquibase.exception.CommandLineParsingException: Unexpected value ‘"–driver=com.mysql.cj.jdbc.Driver’ (options must start with a ‘–’)
at liquibase.integration.commandline.Main.parseOptions(Main.java:778)
at liquibase.integration.commandline.Main.run(Main.java:185)
at liquibase.integration.commandline.Main.main(Main.java:137)
I’ve dumped most of the parameters into a liquibase.properties file, to no avail…I thought I found someone else dealing iwth the leading doublequote on the rejected parameter string (i.e., it appears to be parsing the parameters as "-- instead of simply --), but I’m struggling to understand how to get around that while doing a diff, by putting all my parameters into a liquibase.properties file.
Trying to find the issue I’m experiencing, this seems to be close to the closest … I’m hoping that someone can tell me what I’m doing wrong… my command is
./liquibase --driver=com.mysql.cj.jdbc.Driver --url=jdbc:mysql://{it’svalid}:3306/db_schema_1?useLegacyDateTimeCcxle=false&serverTimezone=UTC --username={it’svalid} --password={it’svalid} diff --referenceUrl=jdbc:mysql://{it’svalid}:3306/db_schema_2?useLegacyDateTimeCcxle=false&serverTimezone=UTC --referenceUsername={it’svalid} --referencePassword={it’svalid} --changeLogFile=databaseChangeLog.sql
I’m getting this in response:
java -cp “.:/home/someguy/needit/liquibase/liquibase.jar:/home/someguy/needit/liquibase/lib/:/home/someguy/needit/liquibase/lib/jcl-over-slf4j-1.7.25.jar:/home/someguy/needit/liquibase/lib/jul-to-slf4j-1.7.25.jar:/home/someguy/needit/liquibase/lib/log4j-over-slf4j-1.7.25.jar:/home/someguy/needit/liquibase/lib/logback-1.1.jar:/home/someguy/needit/liquibase/lib/logback-classic-1.2.3.jar:/home/tkrueger/needit/liquibase/lib/logback-core-1.2.3.jar:/home/someguy/needit/liquibase/lib/mysql-connector-java-8.0.15.jar:/home/someguy/needit/liquibase/lib/slf4j-api-1.7.25.jar:/home/someguy/needit/liquibase/lib/snakeyaml-1.18.jar” liquibase.integration.commandline.Main “–driver=com.mysql.cj.jdbc.Driver --url=jdbc:mysql://{it’svalid}:3306/db_schema_1 --username={it’svalid} --password={it’svalid} diff --referenceUrl=jdbc:mysql://{it’svalid}:3306/db_schema_2 --referenceUsername={it’svalid} --referencePassword={it’svalid} --changeLogFile=databaseChangeLog.sql”
Starting Liquibase at Thu, 02 May 2019 14:21:56 CDT (version 3.6.3 built at 2019-01-29 11:34:48)
To display the help, please pass the ‘–help’ option on the command line.
Unexpected error running Liquibase: Unexpected value ‘"–driver=com.mysql.cj.jdbc.Driver’ (options must start with a ‘–’)
liquibase.exception.CommandLineParsingException: Unexpected value ‘"–driver=com.mysql.cj.jdbc.Driver’ (options must start with a ‘–’)
at liquibase.integration.commandline.Main.parseOptions(Main.java:778)
at liquibase.integration.commandline.Main.run(Main.java:185)
at liquibase.integration.commandline.Main.main(Main.java:137)
I’ve dumped most of the parameters into a liquibase.properties file, to no avail…I thought I found someone else dealing iwth the leading doublequote on the rejected parameter string (i.e., it appears to be parsing the parameters as "-- instead of simply --), but I’m struggling to understand how to get around that while doing a diff, by putting all my parameters into a liquibase.properties file.