Ecto create a repo error

I’m using ecto with mariadb (Mariaex) in a non-Phoenix app. This is my database config:

# config/config.exs
config :iocp_monitor, ecto_repos: [IocpMonitor.Repo]

config :iocp_monitor, IocpMonitor.Repo,
    database: "iocp",
    username: "root",
    password: "1q2w3e4r5t",
    hostname: "localhost",
    port: "3306",
    migration_timestamps: [type: :utc_datetime]

And this is my repo definition:

defmodule IocpMonitor.Repo do
  use Ecto.Repo,
    otp_app: :iocp_monitor,
    adapter: Ecto.Adapters.MySQL
end

When I run mix ecto.create and mix ecto.migrate, they finished successfully, and I can see the new database and the new tables in it, so I suppose the database connection configuration is correct. But when I try to start my otp app, this happens:

13:22:08.399 [error] GenServer #PID<0.421.0> terminating
** (RuntimeError) connect raised ArgumentError exception.The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true if you wish to see all of the details
    :erlang.byte_size/1
    (mariaex) lib/mariaex/messages.ex:103: Mariaex.Messages.encode_handshake_resp/1
    (mariaex) lib/mariaex/messages.ex:219: Mariaex.Messages.encode/2
    (mariaex) lib/mariaex/protocol.ex:1156: Mariaex.Protocol.msg_send/3
    (mariaex) lib/mariaex/protocol.ex:218: Mariaex.Protocol.handle_handshake/3
    (mariaex) lib/mariaex/protocol.ex:171: Mariaex.Protocol.handshake_recv/2
    (db_connection) lib/db_connection/connection.ex:66: DBConnection.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
Last message: nil
State: Mariaex.Protocol

I have no idea why it fails, and I don’t know where to add the configuration :show_sensitive_data_on_connection_error. Can anyone help? Thanks in advance.