Polling SQL Databases
There is no way to pull changes via SQL. But you can read the binary log (be sure it's enabled) just like MySQL slaves do. So, instead of using JDBC, you'll need to use something like mysql-binlog-connector-java.

The basic idea is the same for all RDBMSs: you act as a slave and receive the changes. A real slave would apply those changes to have an exact copy of master's data, but actually once you get the changes, you can do whatever you want with them.

However each database implements replication in a different way, so there is no universal tool to do this. If you need to get changes from Oracle, you'll need to find a specific library for that purpose.