Thursday, October 13, 2016

Re: django 1.10.2 mysql 5.6.34 which connector?

Try mysqlclient as mentioned in https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-api-drivers.

As it says there, MySQL Connector/Python is developed by Oracle and may not support the most recent Django releases.

On Thursday, October 13, 2016 at 6:47:02 PM UTC-4, Andres Marin wrote:
Dear all,

I'm trying to learn about django, follow the documentation, in my first:

python manage.py migrate


all time get this error:


File "/usr/local/lib/python3.5/site-packages/mysql/connector/django/operations.py", line 223, in bulk_insert_sql

    return "VALUES " + ", ".join([items_sql] * num_values)

TypeError: can't multiply sequence by non-int of type 'tuple'


I'm ussing mysql-connector-python-2.1.4 to connect to mysql:


settings.py:

...

'default': {

      'NAME': 'firstapp',

      'ENGINE': 'mysql.connector.django',

...

Python 3.5.2

django 1.10.2

mysql  5.6.34


Do you know which connector I can to use?


I was tried 'pip install mysql-python' to install MySQL-python-1.2.5 but is not possible, regarding with some google results, this version is not supported by python 3.


Any help, will be appreciated.


PD: learning django, I'm new user.


Thanks!

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/88ad11d5-f2e9-45c8-97ba-74bad48d6e70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment