I am trying to connect to my database on planetscale with sqlalchemy, but it gives me this error:
Exception has occurred: NotSupportedError
(MySQLdb.NotSupportedError) (1235, 'charset/name utf8mb3 is not supported')
(Background on this error at: https://sqlalche.me/e/14/tw8g)
The above exception was the direct cause of the following exception:
File "C:\Users\redacted\Desktop\transf-system\app.py", line 4, in <module>
db.create_all()
I connect to my database using a URI, and I added ?charset=utf8mb4
to the end, but that hasnt fixed anything. Here is the URI:
app.config["SQLALCHEMY_DATABASE_URI"] = "mysql://redacted:redacted@redacted:3306?ssl=true?charset=utf8mb4"