ModuleNotFoundError: No module named 'MySQLdb' Amazon MySQL RDS SQLAlchemy

后端 未结 3 362
清歌不尽
清歌不尽 2021-01-21 12:28

I am having issues with connecting Amazon AWS MySQL with SQLAlchemy. According to the instruction, I have connected.

app.config[\'SQLALCHEMY_DATABASE_URI\'] = \'         


        
3条回答
  •  离开以前
    2021-01-21 12:53

    If you use the PyMySQL client to connect to MySQL, your SQLAlchemy connection string needs to start with

     mysql+pymysql://
    

    instead of mysql://.

    If you connect with mysql:// then you will need to install the MySQLdb library as shown in the Traceback.

提交回复
热议问题