1999 chevy blazer

I changed the ignition cylinder on my 99 blazer and now when i try to start the car it wont start i tried the passlock code relearn but i dont know if thats really the problem, when i turn the key to crank the car up the lights radio, a/c, and dash illumination turn off till i let go of trying to crank the car can anyone please help me and tell me whats wrong.

Watch head lights when you try to crank, if they dim check ALL connections,wires and battery.
If they just go out try starting in n instead of park and look at other switches.