A 3.1-magnitude earthquake struck about 2.5 miles northeast of North Shore, a community near the Salton Sea at 4:56 p.m.