How to set up a scan of a MySQL database