connect to localhost db and get data