0

At the moment I am working with MySql database using PyMySql(python). So, when I am sending many requests to my DB, I face the error:

Error Code: 2013. Lost connection to MySQL server during query

If I am trying to get the Information again I face this error:

InterfaceError (0, '')

Here is my code:

with connection.cursor() as cur:
                userId = message.from_user.id
                cur.execute(f"INSERT INTO UserInfo(UserId, Favourites) VALUES ({message.from_user.id}, 'None');")
                connection.commit()
                cur.close()

I had already tried changing settings in MySqlWorkbench following those advises. My settings now.

And my code is like in this question.

So, What should I do to deal with this problem?

Mazerc
  • 1
  • 1

0 Answers0