Forums

Can't backup mysql database because of denied access

I am trying to backup a db based on the instructions found here. 2-3 years ago I used the same snippet without any problems, but now I am getting this error when I run the command:

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
mysqldump: Got error: 1044: Access denied for user 'username'@'%' to database 'username$dbname' when using LOCK TABLES

This is the code I run:

mysqldump -u username -h username.mysql.pythonanywhere-services.com --set-gtid-purged=OFF --no-tablespaces 'username$dbname'  > backup1.sql

What am I doing wrong? Did something changed with the db access via Bash console?

What happens if you add --column-statistics=0 to the command line, after the --no-tablespaces?

The first warning disappeared, but

mysqldump: Got error: 1044: Access denied for user 'username'@'%' to database 'username$hu' when using LOCK TABLES

is still an issue.

Sorry, it might be a stupid question, but it's worth checking -- in your actual command, are you using username or vidra (which is your username)?

I am using the correct username, I mean vidra and here I just added "username" as a placeholder :) . I also forgot to add that after the command a blank sql file is created, but without the exported data. Please let me know if I have to check or try anything else. Thanks

Could you please check if the command would work now?

It seems it works perfectly. Thanks a lot for the help!

Thanks for letting us know!