The present invention relates to the use of the cyclic dinucleotide c-di-GMP and cyclic dinucleotide analogues thereof in a method for attenuating virulence of a microbial pathogen or for inhibiting or reducing colonization by a microbial pathogen. This method further inhibits microbial biofilm formation and is capable of treating bacterial infections. The microbial colonization or biofilm formation inhibited or reduced may be on the skin or on nasal or mucosal surface. The microbial colonization or biofilm formation inhibited can also be on the surfaces of medical devices, especially those in close contact with the patient, as well on the surfaces of industrial and construction material where microbial colonization and biofilm formation is of concern.