[Python] sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied...

Discussão em 'Python' iniciado por Stack, Abril 8, 2025.

  1. Stack

    Stack Membro Participativo

    enter image description herefirst time here...everybody say flask has best community on overflow please help me out...i want to deploy my flask app, all rules followed but my database is not connecting to my app I don't know why? first I install all dependencies that were needed. than I got error [ModuleNotFoundError: No module named 'MySQLdb']. so i took help from chatGPT and install "pip install pymysql" than included in my main.py... import pymysql pymysql.install_as_MySQLdb() and changed my sql_URI like: app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://kalaa:************@sg2plzcpnl508193.prod.sin2.secureserver.net/dev_db'
    than I got new error where I have stuck...the error is...
    sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'kalaa'@'sg2plzcpnl508193.prod.sin2.secureserver.net' (using password: YES)") (Background on this error at: https://sqlalche.me/e/20/e3q8) even though my all .html file are working fine those are not using database like terms & condition, privacy etc....!!! let me show you code also... enter image description here

    Continue reading...

Compartilhe esta Página