Hello,

I getting problem to connect to database only when run "migrate". I'm able
to use on apache/wsgi and runserver, so it's seens that connection to
database is okay. Dango is running on docker.

Anyone can help me ?





bash-4.2# python manage.py migrate
/usr/local/lib/python2.7/site-packages/jwt/utils.py:8:
CryptographyDeprecationWarning: Python 2 is no longer supported by the
Python core team. Support for it is now deprecated in cryptography, and
will be removed in the next release.
  from cryptography.hazmat.primitives.asymmetric.utils import (
Traceback (most recent call last):
  File "manage.py", line 46, in <module>
    execute_from_command_line(sys.argv)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 364, in execute_from_command_line
    utility.execute()
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
line 327, in execute
    self.check()
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
line 359, in check
    include_deployment_checks=include_deployment_checks,
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 61, in _run_checks
    issues = run_checks(tags=[Tags.database])
  File
"/usr/local/lib/python2.7/site-packages/django/core/checks/registry.py",
line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File
"/usr/local/lib/python2.7/site-packages/django/core/checks/database.py",
line 10, in check_database_backends
    issues.extend(conn.validation.check(**kwargs))
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/validation.py",
line 9, in check
    issues.extend(self._check_sql_mode(**kwargs))
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/validation.py",
line 13, in _check_sql_mode
    with self.connection.cursor() as cursor:
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
line 254, in cursor
    return self._cursor()
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
line 229, in _cursor
    self.ensure_connection()
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
line 213, in ensure_connection
    self.connect()
  File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line
94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
line 213, in ensure_connection
    self.connect()
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
line 189, in connect
    self.connection = self.get_new_connection(conn_params)
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py",
line 274, in get_new_connection
    conn = Database.connect(**conn_params)
  File "/usr/local/lib64/python2.7/site-packages/MySQLdb/__init__.py", line
81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/local/lib64/python2.7/site-packages/MySQLdb/connections.py",
line 193, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on
'192.168.201.193' (113)")
bash-4.2# python manage.py check
/usr/local/lib/python2.7/site-packages/jwt/utils.py:8:
CryptographyDeprecationWarning: Python 2 is no longer supported by the
Python core team. Support for it is now deprecated in cryptography, and
will be removed in the next release.
  from cryptography.hazmat.primitives.asymmetric.utils import (

2021-06-18 20:00:05 [DEBUG] [boto:provider:get_credentials:280] [MainThread]
Using access key provided by client.

2021-06-18 20:00:05 [DEBUG] [boto:provider:get_credentials:307] [MainThread]
Using secret key provided by client.

2021-06-18 20:00:05 [DEBUG] [boto:provider:get_credentials:280] [MainThread]
Using access key provided by client.

2021-06-18 20:00:05 [DEBUG] [boto:provider:get_credentials:307] [MainThread]
Using secret key provided by client.
System check identified no issues (0 silenced).

Regards,
_________________

Heron
hero...@gmail.com
_________________

>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFjM0T0nxQCg-j17yhpKkcMwWd_ECbURWctKgawzXP_W9TPG0Q%40mail.gmail.com.

Reply via email to