Bug #100219 mysqldump Access denied Error after upgrading to 8.0.21
Submitted: 14 Jul 2020 15:04 Modified: 12 Mar 6:23
Reporter: Leann Johnson Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:8.0.21 OS:Linux
Assigned to: CPU Architecture:x86
Tags: regression

[14 Jul 2020 15:04] Leann Johnson
Description:
After upgrading to 8.0.21, our regular mysqldump calls began reporting the following error:

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

The dump sql file is created. We have added the --no-tablespaces option to avoid seeing this error.

No change was made to our mysqldump calls. The only change was the mysql upgrade. 

Perhaps this is intended behavior, however I was not able to find anything that seemed to correlate to this in the 8.0.21 release notes.

Here is what our mysqldump commands look like:

mysqldump --login-path=mysqldump DBNAME --single-transaction > /path/to/backup.sql

How to repeat:
Run mysqldump command:

mysqldump --login-path=mysqldump DBNAME --single-transaction > /path/to/backup.sql
[15 Jul 2020 10:26] MySQL Verification Team
Hello Leann Johnson,

Thank you for the report and feedback.

regards,
Umesh
[15 Jul 2020 10:27] MySQL Verification Team
-- Server startup

rm -rf 100219/
bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/100219 --log-error-verbosity=3 
bin/mysqld --no-defaults --basedir=$PWD --datadir=$PWD/100219 --core-file --socket=/tmp/mysql_ushastry.sock  --port=3333 --log-error=$PWD/100219/log.err --mysqlx=0 --log-error-verbosity=3  --secure-file-priv="" --performance-schema=ON 2>&1 &

- craete backup only user
CREATE USER 'bug100219'@'localhost' IDENTIFIED BY 'mysql123!';
GRANT SELECT, SHOW VIEW,  TRIGGER, LOCK TABLES, RELOAD,REPLICATION CLIENT ON *.* TO 'bug100219'@'localhost';
FLUSH PRIVILEGES;

- 8.0.20
bin/mysqldump -ubug100219 -pmysql123! -S /tmp/mysql_ushastry.sock --all-databases --single-transaction >/tmp/8020.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.

- 8.0.21
 bin/mysqldump -ubug100219 -pmysql123! -S /tmp/mysql_ushastry.sock --all-databases --single-transaction >/tmp/8021.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
[15 Jul 2020 12:54] Jean-Jacques Moreau
Same issue here. Is a fix available?
[15 Jul 2020 17:14] Frederic Descamps
Doe it work when you add the PROCESS privileges to the user used for mysqldump ?
[16 Jul 2020 8:42] Georgi Kodinov
Posted by developer:
 
For the record: the query that fails is:
SELECT LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND LOGFILE_GROUP_NAME IS NOT NULL GROUP BY LOGFILE_GROUP_NAME, FILE_NAME, ENGINE, TOTAL_EXTENTS, INITIAL_SIZE ORDER BY LOGFILE_GROUP_NAME.
[16 Jul 2020 17:31] Gopal Shankar
Posted by developer:
 
This behaviour is expected after http://mybug.no.oracle.com/orabugs/bug.php?id=30350829.

Documentation needs to be update.

Duplicate of Bug#31628148.
[10 Mar 16:00] Sveta Smirnova
Gopal,

we do not have access to the Oracle internal bugs database. May we have details why this error is expected?
[12 Mar 6:23] MySQL Verification Team
Hello Sveta,

As Gopal mentioned, this is duplicate of Bug #100229(internal Bug#31628148).
This behavior is expected after Bug #30350829(fixed in 8.0.21) and Quoting change log details here: "Incompatible Change: Access to the INFORMATION_SCHEMA.FILES table now requires the PROCESS privilege.

This change affects users of the mysqldump command, which accesses tablespace information in the FILES table, and thus now requires the PROCESS privilege as well. Users who do not need to dump tablespace information can work around this requirement by invoking mysqldump with the --no-tablespaces option. (Bug #30350829)" please see more details here  https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-21.html

regards,
Umesh