Issue
I am a high school student trying to deploy a web api on EC2. I have been running into a problem where sqlalchemy (not flask_sqlalchemy) wont connect to mysql on ubuntu. I have typed in the password correctly, and am still getting:
Access denied for user 'root'@'localhost'
(Background on this error at: http://sqlalche.me/e/14/f405)
ubuntu@ip-172-31-3-251:~/deployedapp$
My code is:
engine=create_engine("mysql+mysqlconnector://*username*:*password*@localhost/*dbname*")
Any help is appreciated!
Thank you,
A confused high school coder.
EDIT:
This might have something to do with the problem. mysql -u root -p does not log me in. It says access denied. If I put sudo in front, it works.
Solution
I needed to create a new user and grant al privileges on the database to them.
Answered By - A confused high school coder
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.