title: Docker Wordpress connection to the database server on the localhost
body: <p>I run <a href="https://hub.docker.com/_/wordpress/" rel="nofollow noreferrer">docker wordpress image</a> with command </p>
  
  <pre><code>docker run --name  test-wordpress -p 8081:80 -d wordpress
  </code></pre>
  
  <p>MySQL 8 is on localhost on Windows 10. Database credentials are valid.</p>
  
  <p>In wordpress setup I use this configuration</p>
  
  <ul>
  <li>Database name: wordpress (not exist yet)</li>
  <li>Username: root</li>
  <li>Password: ***</li>
  <li>Database host: <strong>localhost</strong>  || <strong>127.0.0.1</strong> || <strong>host.docker.internal</strong></li>
  </ul>
  
  <p>I get error</p>
  
  <p><strong>Error establishing a database connection</strong></p>
  
  <p>What is correct database host?</p>