[SQLArchemy]MySQL密码出现@特殊字符处理

from urllib.parse import quote_plus as urlquote

# 指定连接的MySQL数据库
PASSWORD = 'root@demo.demo'
DATABASE_URL = f"mysql://root:{urlquote(PASSWORD)}@10.105.212.1:3306/db"
posted @ 2023-03-26 23:56  LeoShi2020  阅读(212)  评论(0编辑  收藏  举报