Compass inversed

My APM 2.8 is showing the compass reversed, I tried to launch my quadcopter for a test run and it kept flipping. All the connections and propellers were correct and placed perfectly. Still it was flipping. Then realised in the flight data menu in mission planner the axis was inverted. when tillted my dron towards right it turned left and same for other side :C. i cant seem to fix this. whats the issue here

You probably have the motors connected in the wrong order, and are reading the artificial horizon on MP wrong.