Mayor Wilkins is not only the elected mayor of the people of Sunnydale, but also is — in some sense — the "mayor" of the demon population at the Hellmouth.
According to Buffy: The Animated Series, Wilkins was a human who originally arrived in California in the 19th Century, and founded Sunnydale on the site of Boca del Infierno shortly after a Vampire Slayer, Naayéé'neizgháni, had been killed there. Wilkins stumbled upon the Hellmouth and found it overrun with demons because of the death of the Slayer. He ended up making a pact to avoid being killed himself. He agreed to make Sunnydale a refuge for demons, so that they could feed on town's inhabitants without interference. As part of his pact, he sold his soul and gained immortality. In 1899, he began planning his 100-year Ascension into the form of a pure demon — this is what you see happening in Season 3 of Buffy.
In the time between first meeting the Mayor and beginning to "work" for him, Trick may have learned who the Mayor really is: the immortal founder of Sunnydale and the maintainer of the "feeding grounds" on the Hellmouth. He may also have been given details about the Ascension. Perhaps he then felt it would be prudent to cooperate with the Mayor.
Even if some of these aspects of Wilkins story are apocryphal (in all likeliness, they enjoy some level of canon, given Whedon's role as a producer, writer, and consultant for the animated episodes), my conclusion is that Wilkins did nothing to Mr. Trick apart from being powerful, charismatic, and evil. Now in Sunnydale and master-less, Mr. Trick may have decided that he didn't know how to spend his time without a master. Remember, vampires in the Buffyverse tend to develop master-servant relationships. Darla, Angel, Drusilla, and Spike all served The Master at one point:

We know that Mr. Trick's master was Kakistos up to and including their trip to Sunnydale. In some sense, Buffy herself played the role of master to Spike in the later seasons of Buffy. In the the final season of Angel, the vampire Harmony Kendall enjoys serving Angel and the other partners as a secretary in the law firm, even though they neither need nor want her there. In general, we see countless minion vampires serving powerful, "leader" vampires (of which there are far fewer).
Wilkins easily fit the role of master for Trick, giving him various violent tasks to sate his appetite. Generally speaking, vampires in the Buffyverse do not seem to be consciously aware of their need to serve masters, and so Mr. Trick may have acquiesced gradually into the role despite his own initial reluctance.