I'm pretty new at working with databases and I have hit a small snag while attempting to setup my MySQL db.
I was successfully using a sqlite db but I wanted to make my flask site a little more robust so I have been converting everything over to a local mysql db. Everything is working fine locally but I am not quite understanding the role of users I'm afraid. Here's what's going on:
I have a mysql database created here (pythonanywhere) and I was trying to do a restore on it from my local db dump but when I tried it I got this error: ERROR 1044 (42000) at line 22: Access denied for user '<myusername>'@'%' to database '<my database>'
I had created a user with all privileges on my local database but the name was different from my user name here. I thought I might need to create an identical user in my local database so that they match but that didn't seem to help.
When I created the local user I did:
sql CREATE USER '<my-pythonanywhere-username>'@'%' IDENTIFIED BY <password>;
I then granted that one all privileges.
I know I'm probably missing something small but I think it would help to know how users should be handled in my local database (assuming that is what is causing my error).