Skyhawk 172/Cutlass 172
Flight Crew Commercial; Flight Crew Instrument; Flight Crew Multiengine
Flight Crew Last 90 Days 20; Flight Crew Total 300; Flight Crew Type 250
Training / Qualification; Situational Awareness; Time Pressure
ATC Issue All Types; Aircraft Equipment Problem Less Severe; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Published Material / Policy
Air Traffic Control Provided Assistance; Flight Crew Overcame Equipment Problem; Flight Crew Landed in Emergency Condition; Flight Crew Diverted
Procedure; Aircraft; Airspace Structure; Human Factors; Weather
Weather deteriorated while visiting in ZZZ; airport went IFR; [but] VMC conditions still existed. We had to file to get out. The freezing levels were at 7;000 feet. I filled for 6;000 feet. When we received the clearance; I accepted as long as we could stay low and cancel over the desert. ZZZ [Approach] would not allow this stating that we knew the conditions. We were assigned the climb up to 11;000 feet.; my intentions were to cancel over [the] desert and continue VFR.I requested lower due to the OAT and was denied the request. I then asked to divert for [a] VOR. [Controller] gave me vectors and my mag compass was off by 15 degrees. ZZZ [Approach] then [advised for me] and gave me no gyro back to my new choice. The icing started to melt off around 4;000 feet and I was able to land VFR and wait out the clouds.
GA pilot reported taking off in a C172 into known icing.  Ice built rapidly and forced a diversion to the nearest airport.