Fixed config file mismatch
Fixed MySQL issues

- Now connecting to database in DSN
- Deferred closing of rows