Preloader with MySQL connection

I’ve searched for this with no luck, so forgive me if it’s been discussed before.

I have a preloader and I have a file that loads a lot of data from a MySQL file. Both work independently.

The problem is the file size is small so the preloader flies by and then the program is loaded. But then it seems to lock up for a while as it loads the MySQL data.

Is there anyway to have the preloader show the progress of the database connection?