A magnitude 3.2 earthquake rattled Long Beach just before 1 a.m. on Friday, according to the U.S. Geological Survey.