when running the code on a local server our Char encoding default is UTF-8mb4 (that's 4 bytes)
The AWS Char encoding default is UTF-8 (that's 3 bytes) as shown in the picture.
In this case, special characters (Chinese, Russian, figures, etc.) could not be encoded Thus the program crushes.
To solve the issue we can choose 2 options:
- change the encoding with every connection in the pymysql connection (shown in the picture)
- create an init connection value in the AWS MySQL server.

when running the code on a local server our Char encoding default is UTF-8mb4 (that's 4 bytes)
The AWS Char encoding default is UTF-8 (that's 3 bytes) as shown in the picture.
In this case, special characters (Chinese, Russian, figures, etc.) could not be encoded Thus the program crushes.
To solve the issue we can choose 2 options: