diff --git a/liquibase-core/src/main/java/liquibase/integration/commandline/Main.java b/liquibase-core/src/main/java/liquibase/integration/commandline/Main.java
index <HASH>..<HASH> 100644
--- a/liquibase-core/src/main/java/liquibase/integration/commandline/Main.java
+++ b/liquibase-core/src/main/java/liquibase/integration/commandline/Main.java
@@ -1404,7 +1404,7 @@ public class Main {
                 );
 
         Database database = null;
-        if (this.url != null) {
+        if (dbConnectionNeeded(command) && this.url != null) {
             database = CommandLineUtils.createDatabaseObject(fileOpener, this.url,
                     this.username, this.password, this.driver, this.defaultCatalogName, this.defaultSchemaName,
                     Boolean.parseBoolean(outputDefaultCatalog), Boolean.parseBoolean(outputDefaultSchema),
@@ -1904,6 +1904,10 @@ public class Main {
         }
     }
 
+    private boolean dbConnectionNeeded(String command) {
+        return ! COMMANDS.REGISTER_CHANGELOG.equalsIgnoreCase(command);
+    }
+
     private boolean isLicenseableCommand(String formatValue) {
         return COMMANDS.ROLLBACK_ONE_CHANGE_SET.equalsIgnoreCase(command) ||
                COMMANDS.ROLLBACK_ONE_CHANGE_SET_SQL.equalsIgnoreCase(command) ||
We do not need to connect to the DB for registerChangeLog even if there is a URL specified LB-<I>