A magnitude 5.7 earthquake struck central Bangladesh, killing at least nine people and injuring more than 300.