python - how to run manage.py on heroku with cleardb apps -
i uploaded django app heroku , provision cleardb add-on using these 3 commands heroku documantation:
heroku addons:create cleardb:ignite heroku config | grep cleardb_database_url heroku config:set database_url='mysql://adffdadf2341:adf4234@us-cdbr-east.cleardb.com/heroku_db?reconnect=true'
it seems o.k , app running (but without database). try run: $ heroku run python manage.py migrate
and error get:
traceback (most recent call last): file "manage.py", line 22, in <module> execute_from_command_line(sys.argv) file "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line utility.execute() file "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/__init__.py", line 355, in execute self.fetch_command(subcommand).run_from_argv(self.argv) file "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/base.py", line 283, in run_from_argv self.execute(*args, **cmd_options) file "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/base.py", line 327, in execute self.check() file "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/base.py", line 359, in check include_deployment_checks=include_deployment_checks, file "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 61, in _run_checks issues = run_checks(tags=[tags.database]) file "/app/.heroku/python/lib/python3.5/site-packages/django/core/checks/registry.py", line 81, in run_checks new_errors = check(app_configs=app_configs) file "/app/.heroku/python/lib/python3.5/site-packages/django/core/checks/database.py", line 10, in check_database_backends issues.extend(conn.validation.check(**kwargs)) file "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/mysql/validation.py", line 9, in check issues.extend(self._check_sql_mode(**kwargs)) file "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/mysql/validation.py", line 13, in _check_sql_mode self.connection.cursor() cursor: file "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/base/base.py", line 254, in cursor return self._cursor() file "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/base/base.py", line 229, in _cursor self.ensure_connection() file "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection self.connect() file "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/base/base.py", line 189, in connect self.connection = self.get_new_connection(conn_params) file "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/mysql/base.py", line 274, in get_new_connection conn = database.connect(**conn_params) file "/app/.heroku/python/lib/python3.5/site-packages/mysqldb/__init__.py", line 86, in connect return connection(*args, **kwargs) file "/app/.heroku/python/lib/python3.5/site-packages/mysqldb/connections.py", line 204, in __init__ super(connection, self).__init__(*args, **kwargs2) typeerror: 'reconnect' invalid keyword argument function
where problem comes from? , how can fix it?
remove ?reconnect=true
end of database_url
the parameters after database arguments mysql server. in case, asks reconnect if connection dropped. looks mysqldb package doesn't support argument.
Comments
Post a Comment