How to enable Show Engine Innodb Status

From Brian Nelson Ramblings
Revision as of 03:55, 25 February 2022 by Brian (Talk | contribs) (How to enable Show Engine Innodb Status)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to enable Show Engine Innodb Status

Are you trying to see the latest deadlocks or foreign key errors but run in to the following error:

[Error Code: 1227, SQL State: 42000] Access denied; you need (at least one of) the PROCESS privilege(s) for this operation

When this happens you will need to grant your user the PROCESS privilege.

GRANT SELECT, PROCESS ON *.* TO '<youruser>'@'localhost';

Creating a new user to view Show Engine Innodb Status

Sometimes you find that a client or yourself wants to view Show Engine Innodb Status and they want a new user to do this with.

Here are the standard commands to create and grant them the privileges:

CREATE USER '<newuser>'@'%' IDENTIFIED BY '<password>';
GRANT SELECT, PROCESS ON *.* TO '<newuser>'@'%';
FLUSH PRIVILEGES;

This is the bare minimum to enable them to run (Show Engine Innodb Status)