K
K
Kekatoz2021-03-02 18:44:17
MySQL
Kekatoz, 2021-03-02 18:44:17

How to fix an error with access?

In a flask in the main2 file through SQLAlchemy, I created several tables. Then I go to python main2.py shell.
I write commands there:

from main2 import db
db.create_all()


and after the last one I get an error
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1698, "Access denied for user 'root'@'localhost'")
(Background on this error at: http://sqlalche.me/e/13/e3q8).


how to solve the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gromyko21, 2021-03-03
@Kekatoz

The problem is that in the settings where you specified the root database user, something is wrong. Check the username and password for it, which you pass in the code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question