Not every dog is as friendly as yours.
The dog that runs up to every dog wanting to play or be friends, is inviting disaster on his head. That other dog may be having a bad day, not be friendly, or feel threatened by a strange dog running towards them. The upshot is an increased risk of dog-on-dog aggression that could end with a fight and a trip to the vet clinic.
Of course, dogs being sociable is a good thing, as long as you keep things under control. When your dog listens to your commands and does as told, then it's perfectly fine to ask the other dog's owner if it's OK to approach, and let the dogs meet in a safe way.
When breaking bad behavioral habits, it's always a good idea to look at things from the dog's point of view. To him, running up to another dog is its own reward as he gets to play. Part of retraining is making yourself fun to the dog, rewarding good behavior in a way that makes him keen to obey.
The secret to training is to make the reward for obeying, outweigh the reward to the dog of doing their own thing. In the case of running up to other dogs, you need to factor in the fun of being rewarded with play. One way round this is to reward the dog for a successful recall and then allow him to approach the other dog in a controlled way. Thus, he gets to have his cake and eat it too.
Of course, it's not always appropriate to approach the other dog... but he doesn't know this. And those rare times when you do pop the leash on and march in the opposite direction, will only act to reinforce that he has to behave to get the full benefits.
As with all training, start from a young age. Good obedience established early stands you in good stead throughout the dog's life. However, it's never too late to start and teach an old dog new obedience! Just be sure to make the sessions fun and end on a high note. Also, train every day for 10 - 15 minutes, to keep everything fresh and focused in the dog's mind.
Start basic training in a distraction-free place, such as the home or yard. As your dog gets more responsive, then train in different locations to emphasize that he's expected to obey no matter where you are:
You will need: