I upgrade MySQL DB from 5.6 to 5.7 version not too long now with no issues happened after. But at that time I did not use mysqldump command. Now I tried to backup the database and gettting this error message:
mysqldump: Error: ‘Access denied; you need (at least one of) the PROCESS privilege(s) for this operation’ when trying to dump tablespaces
How to fix this error.
ANSWER
The PROCESS privilege requirement was added only in MySQL version 5.7.31. This is an expected behavior and affects mysqldump utility. There is a report here and some discussions –
https://bugs.mysql.com/bug.php?id=100219
If your user has no admin privilege to the MySQL database, the quick workaround is to add the –no-tablespaces option. The usage like below.
mysqldump --no-tablespaces -u user -p DB_NAME > BACKUP_FILE.sql
On the other hand, if you have admin access, then grant that user the PROCESS privilege like this:
GRANT PROCESS ON *.* TO user@localhost;
Be warned that such privilege is usually reserved for server administrator users. It works on a global context, so it cannot be specified on a per database approach. Granting just any user this PROCESS privilege is not a good idea. It may cause “data leaks” when sensitive queries gets exposed because this privilege can allow a user to see queries being executed in active sessions. This becomes more critical when the server instance is shared.