Event Not Found

I am following the instructions for setting up a replica set. I have mongod running and can connect using shell and then authorize using db.auth(). However, when I try to run the command:

mongo --host "<cluster-name>/" --u "<my-username>" --p <"my-password"> --authenticationDatabase "admin"

I get the following error:

-bash: !xRKFJX: event not found

I am running mongo version 4.4.6.

Do you know why I might not be able to authenticate using the mongo optional flags?

May be your password has a special character “!” and shell interpreting it differently
Try to use single quote -u and -p param instead of --username and --password

or you have to escape the special characters

Are you not using IDE for this course?