各位好: 我通过mysql cdc链接mysql(mariadb)一直不成功。网上也搜不到有效的解决方法。 用pyflink调试就一直运行也没数据也不报错。用flink sql就报java.net.ConnectException: Connection refused。 用slave可以远程连接mysql,也执行了 grant replication client, replication slave on *.* to 'slave'@'%' identified by 'slave'; sql和mysql的配置信息在下方,期盼大佬解答
flink sql如下: CREATE TEMPORARY TABLE xin_test ( > id INT, > name STRING > ) WITH ( > 'connector' = 'mysql-cdc', > 'hostname' = '*.*.*.203', > 'port' = '3306', > 'username' = 'slave', > 'password' = 'slave', > 'database-name' = 'test', > 'table-name' = 'test', > 'server-id' = '10001', > 'server-time-zone' = 'Asia/Shanghai' > ) > ; Flink SQL> select * from xin_test; [ERROR] Could not execute SQL statement. Reason: java.net.ConnectException: Connection refused mysql的配置信息: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock symbolic-links=0 log-bin=mysql-bin server-id=10001 replicate-do-db=test [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid