farcepest / MySQLdb1

MySQL database connector for Python (legacy version)
https://sourceforge.net/projects/mysql-python/
667 stars 318 forks source link

Unknown system variable 'storage_engine' #103

Open melinath opened 8 years ago

melinath commented 8 years ago

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'")
methane commented 8 years ago

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

claudep commented 8 years ago

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.

melinath commented 8 years ago

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

krdeepak commented 4 years ago

@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.