A powerful earthquake has struck southern Japan, killing at least two people and injuring hundreds of others.