Mongo sharding cluster prompt: sharding not enabled for db xxx

I execute the first command:

db.runCommand({"enablesharding":"yuncaitest"})

Tip:

sharding already enabled for database yuncaitest

indicates that the sharding cluster has been enabled for this database.

when I set a collection as a sharding cluster, run the command:

db.runCommand({"shardcollection":"yuncaitest.aa","key":{"_id":"hashed"}})

Tip:

sharding not enabled for db yuncaitest

this in turn indicates that the database does not have a sharding cluster open.

what on earth is going on?

May.22,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c3e17c-3c77d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c3e17c-3c77d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?