Skip to content

yanghs6/sample_mysql_python_error_2013

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of Python sqlalchemy

Summary

  • MySQL [Error Code: 2013] occurs when a Python sqlalchemy connection exceeds the MySQL wait_timeout.

Detail

1. Error case

error case

2. Fix case

fix case

How to use

# Stop & delete docker container
docker stop test_mysql
docker rm test_mysql
# Build container
docker build . -t test_mysql:1.0
# Run containe
docker run --name test_mysql -p 33067:3306 -h localhost test_mysql:1.0

# Install python package
pip install -r requirements.txt
# Run python and see error!
python code/test_01_simple_sqlalchemy.py
python code/test_02_example_class.py

About

Sample code of python and MySQL with 2013 error and wait_timeout

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages