added mysql table creation sql
remove catch all Except in while loop to try to catch errors