A guide to various connections
Pixhawk 2 cube pinout
Generally, the Pixhawk is connected to the TTL cable via Telem 2 Port. The Pinout for the Telem 2 is given in above image. Connect the VCC and GND of the TTL cable to the VCC and GND of the Telem 2 port (first and last as shown in above fig.). Now connect the MCU_TX to the Rx port of the TTL cable (generally white) and the MCU_RX to the Tx port of the TTL cable (generally green). The same configuration works for older pixhawks also.
For other parameter changes refer: