Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mysql-server-has-gone

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql-server-has-gone

Django myslq backend that fixes issue with long living connection

  • 2.0.4
  • PyPI
  • Socket score

Maintainers
1

基于下面库进行优化,主要适配Django==5.0.3以后的版本。修复原子事务报错的问题

安装:pip install mysql_server_has_gone 因为代码里用到了MySQLdb库,所以需要安装mysqlclient。如果你用到了其他库导致报错,可以github上滴滴我,我会及时修复的。

以下是原始文档:

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==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',
	}
}

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc