When I connect my iPad Mini with Retina to iTunes on my MacBook Air it acts as if there's a loose connection on the cable & keeps connecting/un connecting to iTunes with the mac constantly making the beeping noise it makes when you first connect it. The iPad is on the latest 7.1.2 software & the MacBook on the latest iTunes 11.2.2. My iPhone 5s has no issues on the computer with the same cable & the iPad charges from the mains no problem with the same cable. WHATS GOING ON 
iPad Mini with Retina Erratic Behaviour When Connected To MacBook Air
iPad mini SeriesI don't know, but my first guess is that the lightning port on your iPad may be damaged somehow or shorting out, but since it charges from "the mains" (I assume that means wall socket), I'm not sure what's going on. I'd seriously consider a genius bar appointment with the nearest Apple Store....🙂
Original thread: https://forums.imore.com/threads/ipad-mini-with-retina-erratic-behaviour-when-connected-to-macbook-air.292799/