Got database connection working