akoidan / MySQL-server-has-gone-away

MySQL server has gone away

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MySQL-server-has-gone-away

This repository solves issue where database connection inside of django overlives MySQL database connection timeout specified in /etc/my.cnf wait_timeout = xxxx. See this issue

How to use:

  1. For Django 1.x and 2.x use pip install mysql_server_has_gone_away==1.0.0

  2. For django 3.x use pip install mysql_server_has_gone_away==2.0.0

  3. Put this engine into Django settings.py:

DATABASES = {
	'default': {
		'ENGINE': 'mysql_server_has_gone_away', 
		#'NAME': 'database-name',
		#'USER': 'database-user',
		#'PASSWORD': 'database-password',
		#'HOST': 'localhost',
	}
}

About

MySQL server has gone away

License:MIT License


Languages

Language:Python 100.0%