add branch for if no mysql connection