diff --git a/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java b/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java index 8472d6831a..f58ed7eddb 100644 --- a/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java +++ b/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java @@ -1000,8 +1000,8 @@ public class CaptureChangeMySQL extends AbstractSessionFactoryProcessor { TableInfo tableInfo = null; if (jdbcConnection != null) { try (Statement s = jdbcConnection.createStatement()) { - s.execute("USE " + key.getDatabaseName()); - ResultSet rs = s.executeQuery("SELECT * FROM " + key.getTableName() + " LIMIT 0"); + s.execute("USE `" + key.getDatabaseName() + "`"); + ResultSet rs = s.executeQuery("SELECT * FROM `" + key.getTableName() + "` LIMIT 0"); ResultSetMetaData rsmd = rs.getMetaData(); int numCols = rsmd.getColumnCount(); List columnDefinitions = new ArrayList<>();