Grant Statement Fails With Access Denied Error (Doc ID 1538407.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Server - Version 4.0 and later
Information in this document applies to any platform.

Symptoms

A GRANT statement (such as GRANT ALL ON dbname.*...) fails with an access denied error, even when executed as a user that should have all privileges (such as root).

SHOW GRANTS, when executed as a privileged user, returns a long list of privileges (e.g., GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'root'@'localhost'...)

Changes

 The MySQL server has been upgraded between major versions, or a backup which includes the `mysql` schema from an older version has been restored.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms