function for connecting to mysql db