{{{
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
}}}
This does not work in MySQL 5.5.47. The warning doesn't go away.
However, adding ''this'' to `DATABASES` does get rid of the warning:
{{{
'OPTIONS': {
'sql_mode': 'STRICT_TRANS_TABLES',
}
}}}
I found this solution [http://stackoverflow.com/a/23023015/464318 here],
but it seems like it really should be in the docs. Unless this doesn't
work in newer MySQLs?
--
Ticket URL: <https://code.djangoproject.com/ticket/28162>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Robert Rollins):
Forgot to mention that I'm having this problem in Django 1.10.7.
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:1>
* type: Uncategorized => Bug
* version: 1.11 => 1.10
* component: Uncategorized => Documentation
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:2>
Comment (by Tim Graham):
I'm not able to reproduce that problem with MySQL 5.5.55. Can you explain
why the command wouldn't work?
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:3>
Comment (by Robert Rollins):
When I run `manage.py migrate`, I still get the big yellow warning when
using `init_command`. The warning does not trigger when using `OPTIONS`.
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:4>
Comment (by Simon Charette):
Robert, which Python library are you using to connect to MySQL?
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:5>
Comment (by Robert Rollins):
My project uses mysqlclient 1.3.9.
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:6>
Comment (by Tim Graham):
I'm also testing with mysqlclient and the warning goes away for me when
using the `'init_command'` version. When I said "Can you explain why the
command wouldn't work?", I meant: do you know if there's some change in
MySQL 5.5.x that fixed a bug or something? Have you tried to reproduce on
newer versions of MySQL?
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:7>
Comment (by Robert Rollins):
No, I have no idea why this is happening, and have not tested it on any
different versions of MySQL. I'm just reporting the behavior that I'm
seeing in my current development environment.
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:8>
* status: new => closed
* resolution: => worksforme
* easy: 1 => 0
Comment:
Since I can't reproduce the problem, I guess we'll close the ticket until
someone can explain what's going on so we know what documentation change
to make.
--
Ticket URL: <https://code.djangoproject.com/ticket/28162#comment:9>