Elixir mongodb authentication error

I’m using mongodb for my project. While starting the server i’m facing the authentication error.

23:11:16.242 [error] Mongo.Protocol (#PID<0.467.0>) failed to connect: ** (Mongo.Error) auth failed for user mongodb: Authentication failed. 18

Below is my setup

{:mongodb_ecto, “~> 0.1”}

config :sms_be_school, SmsBeSchool.Repo,
username: “mongodb”,
password: “mongodb”,
database: “school_management_system”,
pool_size: 15,
hostname: “”,
port: 27017,
auth_source: “admin”,
auth_mechanism: “DEFAULT”,

I’m able to connect the database with Mongodb Compass but while starting the server in elixir, it’s showing error.

Can anyone help me to resolve this problem?