MySQLdb1 icon indicating copy to clipboard operation
MySQLdb1 copied to clipboard

Unknown system variable 'storage_engine'

Open melinath opened this issue 8 years ago • 4 comments

Just upgraded to mysql 5.7 from 5.6. Everything is working fine, except that I'm getting the following error:

Unknown system variable 'storage_engine'

Traceback:

File "django/db/backends/base/base.py", line 130, in ensure_connection
    self.connect()
  File "django/db/backends/base/base.py", line 119, in connect
    self.connection = self.get_new_connection(conn_params)
  File "django/db/backends/mysql/base.py", line 276, in get_new_connection
    conn = Database.connect(**conn_params)
  File "MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "MySQLdb/connections.py", line 193, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (1193, "Unknown system variable 'storage_engine'")

melinath avatar Dec 15 '15 00:12 melinath

Have you tried MySQLdb directly? It seems problem of Django.

methane avatar Dec 15 '15 02:12 methane

This is not an issue with the driver. From the 5.6 docs: default_storage_engine should be used in preference to storage_engine, which is deprecated. Django itself doesn't use storage_engine, but you might have it in the OPTIONS dict of your DATABASES settings. You should then update it.

claudep avatar Dec 15 '15 07:12 claudep

:-/ yep that was the problem. Sorry to have bothered you with this; thanks for the solution!

melinath avatar Dec 15 '15 19:12 melinath

@melinath Is it working fine with mysql 5.7. We have a legacy database which is mysql 5.5. We are upgrading our server from ubuntu 14.04 to 18.04 and wanted to check if we can upgrade mysql to 5.7 also.

Thanks for the help.

krdeepak avatar Aug 13 '19 06:08 krdeepak