4578 instead of b_mahdiya or c_mahdiya) for the County of Mahdiya. The religion of a character in Crusader Kings 2 can, like the religion of a province, also be changed very easily. Up-to-date, detailed help for the Europa Universalis IV (EU4) command change_religion.
So, the below command would change your character's religion to Orthodox: To change the religion of a character that isn't yours to Orthodox, all you'd need to do is add the character ID of the character to the above command.