You can set the password of the root user when you create an instance.

You can also change or reset the password in the ApsaraDB for MongoDB console. For more information, see Set a password for a replica set instance.