Side notes: This is part of a Flask app that runs successfully locally.
Is there something else I could post or be directed toward to help solve this?
Update: The connection error has now shifted to (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused). It occurs when the database is first attempted to be accessed in the Flask app.
db.session.query(table.col_name).all() # line of current error, in a function decorated with @app.before_first_request
Note: The following was the place of initial connection error, where attempt
has the format outlined below [1]. It was apparently solved with a slight formatting change (but current error now exists).
engine = create_engine(attempt, convert_unicode=True) # , echo=False)
Base = declarative_base()
Base.metadata.reflect(engine) # line of initial error
Previously:
Using the following format [1]:
'mysql+pymysql://username:password@username.mysql.pythonanywhere-services.com/username$dbname'
I am unable to connect:
2018-01-17 03:00:48,499: Error running WSGI application 2018-01-17 03:00:48,503: OperationalError: (pymysql.err.OperationalError) (1044, u"Access denied for user 'Epere063'@'%' to database 'epere063$hubzu'") (Background on this error at: http://sqlalche.me/e/e3q8)