connect to mysql, execute queries