<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="106401" data-post-id="106401">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Aetherus" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Aetherus/120/17203_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Aetherus
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m using ecto with mariadb (Mariaex) in a non-Phoenix app. This is my database config:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"># 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]
</code></pre>
<p>And this is my repo definition:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule IocpMonitor.Repo do
  use Ecto.Repo,
    otp_app: :iocp_monitor,
    adapter: Ecto.Adapters.MySQL
end
</code></pre>
<p>When I run <code>mix ecto.create</code> and <code>mix ecto.migrate</code>, 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:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">13:22:08.399 [error] GenServer #PID&lt;0.421.0&gt; 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
</code></pre>
<p>I have no idea why it fails, and I don’t know where to add the configuration <code>:show_sensitive_data_on_connection_error</code>. Can anyone help? Thanks in advance.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="106401" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-create-a-repo-error/13820/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-106401" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="106401"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="122199" data-post-id="122199">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="alex3.0" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  alex3.0
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I have the same problem, I don’t have idea where to put  <code>:show_sensitive_data_on_connection_error</code></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="122199" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-create-a-repo-error/13820/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-122199" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="122199"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="127679" data-post-id="127679">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garthk" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/garthk/120/15326_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garthk
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<pre data-code-wrap="elixir"><code class="lang-elixir">config :my_app, MyApp.Repo,
  # Help diagnose connection errors:
  show_sensitive_data_on_connection_error: true
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="127679" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-create-a-repo-error/13820/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-127679" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="127679"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>