A mounting apparatus is provided to hold a data storage device including opposite sidewalls. The mounting apparatus includes a fixing board fixed to one of the sidewalls, an installing member, and a resilient member mounted to the installing member. A mounting portion extends from an end of the fixing board. The installing member defines a receiving space. The mounting portion is received in the receiving space, and slidably mounted to the installing member. The resilient member elastically resists against the mounting portion.