Skip to content

Conversation

@MarkusSagen
Copy link
Contributor

For certain versions of MYSQL it will fail to connect if the port is enterprated as a string and will throw a status 500 error when connecting to the database

# Error occurs here for reference if others encounter the same issue
cur = mysql.connection.cursor()

For certain versions of MYSQL it will fail to connect if the port is enterprated as a string and will throw a status 500 error when connecting to the database 

```python
# Error occurs here for reference if others encounter the same issue
cur = mysql.connection.cursor()
```
@logreg-n-coffee
Copy link

Thanks for making this PR. In my auth/server.py. I casted the type of the mysql port to an int, and solved an issue regarding connecting to mysql.

server.config["MYSQL_PORT"] = int(os.environ.get("MYSQL_PORT"))  # type:int

Copy link

@Yakult0815 Yakult0815 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this PR, I can confirm the error is thrown running versions:
Flask==2.2.2
Flask-MySQLdb==1.0.1

@kantancoding kantancoding merged commit d02ce6f into kantancoding:main Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants