A compound represented by the following structural formula: or a pharmaceutically acceptable salt thereof, wherein: X is N or CR c; R 1 is alkyl or -NR a R b; R 2 is H; halogen; -CN; -NRC R; -C OR; -C NR a R b; monocyclic heteroaromatic optionally substituted with one or more groups selected from alkyl, - CN, -NRC R, -C OR, -C NR a R b and halogen; monocyclic non-aromatic heterocycle optionally substituted with one or more groups selected from alkyl, halogen, -CN and =O; or alkyl optionally substituted by one or more groups selected from halogen, hydroxy, alkoxy, -NR a R b, -NRC R,-NRC O(alkyl), -NRC N 2, -C OR, thiol, alkylthiol, nitro, -CN, =O, -OC H, -OC (alkyl), -OC O(alkyl), -OC N 2 and -C NR a R b; R 3 is alkyl, haloalkyl, hydroxyalkyl, alkoxyalkyl, cycloalkyl, monocyclic non-aromatic heterocycle, monocyclic heteroaromatic or phenyl, wherein the phenyl, monocyclic non-aromatic heterocycle and monocyclic heteroaromatic group represented by R 3 are optionally substituted with one or more groups selected from alkyl, halogen, haloalkyl, alkoxy, haloalkoxy, nitro and -CN; R 4 and R 5 independently are halogen, -CN, -OR, -SR, -N 2, -C R, -C OR, -OC O(alkyl), -C O(haloalkyl), -OC R, -C N 2, -OC N 2, -NRC R, -NRC O(alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2, -NRSO 2 N 2, haloalkyl, haloalkoxy, cycloalkoxy, cycloalkyl, monocyclic non-aromatic heterocycle, monocyclic heteroaromatic or alkyl, wherein the alkyl, monocyclic non-aromatic heterocycle and monocyclic heteroaromatic group represented by R 4 or R 5 are optionally substituted with one or more groups selected from -CN, -OR, -SR, -N 2, =O, -C R, -C OR, -C O(haloalkyl), -OC R, -OC O(alkyl), -C N 2, -OC N 2, -NRC R, -NRC O(alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2 and -NRSO 2 N 2; R 6 is H, halogen, -CN, -OR, -SR, -N 2, -C R, -C OR, -OC O(alkyl), -C O(haloalkyl), -OC R, -C N 2, -OC N 2, -NRC R, -NRC O( alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2, -NRSO 2 N 2, haloalkyl, haloalkoxy, cycloalkoxy, cycloalkyl or alkyl, wherein the alkyl group represented by R 6 is optionally substituted with one or more groups selected from -CN, -OR, -SR, -N 2, =O, -C R, -C OR, -C O(haloalkyl), -OC R, -OC O(alkyl), -C N 2, -OC N 2, -NRC R, -NRC O(alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2 and -NRSO 2 N 2; or R 5 and R 6, taken together with the carbon atoms to which they are bonded, form a moncyclic non-aromatic heterocycle opotionally substituted with one or more groups selected from alkyl, halogen, hydroxyalkyl, alkoxyalkyl, haloalkyl and =O; and each R independently is H or alkyl; R a and R b are independently H, alkyl or R a and R b can be taken together with the nitrogen to which they are attached to form a monocyclic non-aromatic heterocycle; and R c is H, alkyl, or halogen. X is N or CR c; R 1 is alkyl or -NR a R b; R 2 is H; halogen; -CN; -NRC R; -C OR; -C NR a R b; monocyclic heteroaromatic optionally substituted with one or more groups selected from alkyl, - CN, -NRC R, -C OR, -C NR a R b and halogen; monocyclic non-aromatic heterocycle optionally substituted with one or more groups selected from alkyl, halogen, -CN and =O; or alkyl optionally substituted by one or more groups selected from halogen, hydroxy, alkoxy, -NR a R b, -NRC R,-NRC O(alkyl), -NRC N 2, -C OR, thiol, alkylthiol, nitro, -CN, =O, -OC H, -OC (alkyl), -OC O(alkyl), -OC N 2 and -C NR a R b; R 3 is alkyl, haloalkyl, hydroxyalkyl, alkoxyalkyl, cycloalkyl, monocyclic non-aromatic heterocycle, monocyclic heteroaromatic or phenyl, wherein the phenyl, monocyclic non-aromatic heterocycle and monocyclic heteroaromatic group represented by R 3 are optionally substituted with one or more groups selected from alkyl, halogen, haloalkyl, alkoxy, haloalkoxy, nitro and -CN; R 4 and R 5 independently are halogen, -CN, -OR, -SR, -N 2, -C R, -C OR, -OC O(alkyl), -C O(haloalkyl), -OC R, -C N 2, -OC N 2, -NRC R, -NRC O(alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2, -NRSO 2 N 2, haloalkyl, haloalkoxy, cycloalkoxy, cycloalkyl, monocyclic non-aromatic heterocycle, monocyclic heteroaromatic or alkyl, wherein the alkyl, monocyclic non-aromatic heterocycle and monocyclic heteroaromatic group represented by R 4 or R 5 are optionally substituted with one or more groups selected from -CN, -OR, -SR, -N 2, =O, -C R, -C OR, -C O(haloalkyl), -OC R, -OC O(alkyl), -C N 2, -OC N 2, -NRC R, -NRC O(alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2 and -NRSO 2 N 2; R 6 is H, halogen, -CN, -OR, -SR, -N 2, -C R, -C OR, -OC O(alkyl), -C O(haloalkyl), -OC R, -C N 2, -OC N 2, -NRC R, -NRC O( alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2, -NRSO 2 N 2, haloalkyl, haloalkoxy, cycloalkoxy, cycloalkyl or alkyl, wherein the alkyl group represented by R 6 is optionally substituted with one or more groups selected from -CN, -OR, -SR, -N 2, =O, -C R, -C OR, -C O(haloalkyl), -OC R, -OC O(alkyl), -C N 2, -OC N 2, -NRC R, -NRC O(alkyl), -S R, -SO 2 R, -SO 2 N 2, -NRS R, -NRSO 2 R, -NRC N 2 and -NRSO 2 N 2; or R 5 and R 6, taken together with the carbon atoms to which they are bonded, form a moncyclic non-aromatic heterocycle opotionally substituted with one or more groups selected from alkyl, halogen, hydroxyalkyl, alkoxyalkyl, haloalkyl and =O; and each R independently is H or alkyl; R a and R b are independently H, alkyl or R a and R b can be taken together with the nitrogen to which they are attached to form a monocyclic non-aromatic heterocycle; and R c is H, alkyl, or halogen.