These attempts did work to some extent, but not completely.
All of these countries tried to make their colonies trade only with the mother countries. This made sense to them because it allowed the mother country to be the only one to benefit from the colony's resources. This system did help all of these countries get richer.
However, the systems were not easy to enforce. There was a great deal of smuggling to evade it. The mercantilist systems also helped to annoy the colonists and you can argue that mercantilism helped lead to the colonies' efforts to become independent. In these ways, the attempts to apple mercantilism did not work.