Can't connect to MySQL server

I am finishing the tutorial "A beginner's guide to building a simple database-backed Flask website on PythonAnywhere"

after running db.create_all() i keep having a connection error : ProgrammingError: (mysql.connector.errors.ProgrammingError) 1044 (42000): Access denied for user 'gregwallaon3pi'@'%' to database 'gregw allaon3pi$comments>'

i saw a probable spelling mistake (the '>' an the end of the database name) and i removed it , nothing changes I deleted and re created the database , nothing changes .. please help

If the error message is exactly what you put above then it looks like you've got a space in the database name (gregw allaon3pi instead of gregwallaon3pi).

But perhaps that's a problem with copy/pasting from a console...? I know that that can sometimes introduce extraneous spaces. If so, could you post your DB configuration code (specifically the SQLALCHEMY_DATABASE_URI definition) here? Replacing the password with "*" characters for safety, of course.