In my case, I had to do quite a bit more than just not drink. I had to look at things like my lifestyle, diet, attitude and belief system.
Being in a 12-step program was a start; it helped a lot with my mental attitude, which is one of the biggest reasons I drank. I couldn't stand how I felt because of the negative way I tend to view the world.
But those other changes all came very gradually as I continued to remain sober. They certainly didn't come overnight and took a lot of searching, being open to new ideas and trial and error.