Polling SQL Databases Is there any way to poll for MySQL database changes using JDBC? I need exactly which changes happened (not a simple yes/no).

I tried using a thread which executes every 15 seconds to check whether my database was changed.

The query was directly executed from MySQLworkbench / cli

I need to execute java function, which is not possible in a SQL trigger.
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.