Fix: Add MySQL 5.6 compatibility and detailed error logging
Added better error handling and MySQL 5.6 support for Windows Server: 1. Enhanced error logging in app.py: - Detailed database error messages with error codes - Full stack traces logged to console/PM2 - Error details returned in JSON for debugging 2. Created app-pymysql.py: - Alternative version using PyMySQL instead of mysql-connector-python - Better compatibility with older MySQL 5.6 servers - Handles bit field conversion from bytes to boolean - Pure Python implementation (no C extensions) 3. Added requirements-mysql56.txt: - PyMySQL 1.1.0 for MySQL 5.6 compatibility - Use this on Windows servers with old MySQL For production Windows servers with MySQL 5.6, use: pip install -r requirements-mysql56.txt python app-pymysql.py For debugging 500 errors, check console/PM2 logs for detailed error messages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
3
requirements-mysql56.txt
Normal file
3
requirements-mysql56.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Flask==3.0.0
|
||||
PyMySQL==1.1.0
|
||||
# Alternative to mysql-connector-python for better MySQL 5.6 compatibility
|
||||
Reference in New Issue
Block a user