Added a little bit of error handling to db
Added getting MySQL credentials from environment variables

db_host, db_user, and db_pass