An earthquake of magnitude 5.9 hit Myanmar on Friday near its northeastern border with China but there were no immediate reports of damage, a meteorological official said.