Finish config and connect to mysql DB