title: How to run django web app with mysql in the same Docker? ERROR (docker-compose up -d seems to work ok)
body: <p><strong>Everything seems working fine:</strong>
  But I cannot access it on localhost:8000</p>
  
  <p>'''
  root@zenek:~/InternF# sudo docker-compose ps</p>
  
  <h2>    Name                   Command               State                 Ports</h2>
  
  <p>internf_app_1   sh -c python manage.py run ...   Up      0.0.0.0:8000->8000/tcp<br>
  internf_db_1    docker-entrypoint.sh mysqld      Up      0.0.0.0:3306->3306/tcp, 33060/tcp
  '''</p>
  
  <p>I get this error after after trying to migrate. I got similar error using postgres db as well</p>
  
  <p>'''</p>
  
  <pre><code>root@zenek:~/InternF# sudo docker-compose run app python manage.py migrate
  Starting internf_db_1 ... done
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
      self.connect()
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 195, in connect
      self.connection = self.get_new_connection(conn_params)
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 227, in get_new_connection
      return Database.connect(**conn_params)
    File "/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py", line 84, in Connect
      return Connection(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/MySQLdb/connections.py", line 179, in __init__
      super(Connection, self).__init__(*args, **kwargs2)
  MySQLdb._exceptions.OperationalError: (1045, 'Plugin caching_sha2_password could not be loaded: /usr//usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory')
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "manage.py", line 15, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
      utility.execute()
    File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 361, in execute
      self.check()
    File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 390, in check
      include_deployment_checks=include_deployment_checks,
    File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 64, in _run_checks
      issues = run_checks(tags=[Tags.database])
    File "/usr/local/lib/python3.6/site-packages/django/core/checks/registry.py", line 72, in run_checks
      new_errors = check(app_configs=app_configs)
    File "/usr/local/lib/python3.6/site-packages/django/core/checks/database.py", line 10, in check_database_backends
      issues.extend(conn.validation.check(**kwargs))
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/validation.py", line 9, in check
      issues.extend(self._check_sql_mode(**kwargs))
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/validation.py", line 13, in _check_sql_mode
      with self.connection.cursor() as cursor:
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 256, in cursor
      return self._cursor()
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 233, in _cursor
      self.ensure_connection()
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
      self.connect()
    File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
      raise dj_exc_value.with_traceback(traceback) from exc_value
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
      self.connect()
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py", line 195, in connect
      self.connection = self.get_new_connection(conn_params)
    File "/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 227, in get_new_connection
      return Database.connect(**conn_params)
    File "/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py", line 84, in Connect
      return Connection(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/MySQLdb/connections.py", line 179, in __init__
      super(Connection, self).__init__(*args, **kwargs2)
  django.db.utils.OperationalError: (1045, 'Plugin caching_sha2_password could not be loaded: /usr//usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory')
  </code></pre>
  
  <p>'''</p>
  
  <p>I am using:</p>
  
  <p>'''</p>
  
  <pre><code>version: "3"
  services:
    app:
      build:
        context: .
      ports:
        - "8000:8000"
      volumes:
        - ./app:/app
      command: &gt;
        sh -c "python manage.py runserver 0.0.0.0:8000"
      depends_on:
        - db
    db:
      image: mysql
      ports:
        - '3306:3306'
      environment:
         MYSQL_DATABASE: 'mysql'
         MYSQL_USER: 'root'
         MYSQL_PASSWORD: 'password'
         MYSQL_ROOT_PASSWORD: 'password'
  </code></pre>
  
  <p>'''</p>
  
  <p>and Dockerfile</p>
  
  <p>'''</p>
  
  <pre><code>FROM python:3.6
  
  ENV PYTHONUNBUFFER 1
  
  COPY ./requirements.txt /requirements.txt
  RUN pip install -r /requirements.txt
  
  RUN mkdir /app
  WORKDIR /app
  COPY ./app /app
  </code></pre>
  
  <p>'''</p>
  
  <p>HELP!</p>