I am fairly new to liquibase and try to set it up on my own computer, running Windows 7 with a local MySQL Server. I have installed the JDBC driver (4.2), opened the TCP/IP Port 3306 on my Firewall and the Server, installed liquibase and added it as a PATH in the environment variables.
As a first command i tried using this:
C:\Users\Marius>H:\Liquibase\Liquibase \
--driver=com.microsoft.sqlserver.jdbc.SQLServerDriver \
--classpath="C:\\Program Files\\Microsoft JDBC Driver 6.2 for SQL Server\\sqljdbc_6.2\\enu\\mssql-jdbc-6.2.2.jre7.jar" \
--url="jdbc:sqlserver://localhost:3306; databaseName=Test" \
--changeLogFile="H:\Liquibase\dbchangelog.xml" \
--username=liquibase \
--password=liquibase \
Update
But when executing I only get:
Unexpected error running Liquibase: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 3306 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
The Server is definitely running since I am able to connect to it with telnet, mySQLWorkbench and several other tools.
When running the command with --url="jdbc:sqlserver:localhost:3306; databaseName=Test"
, I get a different error code.
Unexpected error running Liquibase: liquibase.exception.DatabaseException: Connection could not be created to jdbc:sqlserver:localhost:3306; databaseName=Test with driver com.microsoft.sqlserver.jdbc.SQLServerDriver. Possibly the wrong driver for the given database URL
I tried this again on another computer with a SQL Server 2017, a different JDBC driver (6.0 and 6.2) and Windows 10 as the OS. Deactivating the Firewall doesn't do anything, neither does a clean install of everything.
Any help is appreciated.