Use a waterproof silicone-based sealant for a leaking toilet, like GE Silicone II or Loctite Clear Silicone.