A magnitude-2.8 earthquake struck the southwest of Mexico, a local quake alert agency said on Wednesday.