04-30-2024, 02:42 PM
I’ve encountered a serious issue with MySQL where the root user has lost all privileges out of nowhere. I'm using MySQL Workbench and it's apparent that the schema privileges for the root user are gone. It’s causing significant disruption across various platforms that rely on this server. I've tried to approach this problem by running a couple of commands like FLUSH PRIVILEGES, but nothing seems to work. The peculiar part is that [email protected] has proper access, but when I log in, the privileges aren’t there, and it defaults to 'localhost' which doesn't have any privileges either. The lack of access is what's so baffling and is hindering my ability to solve this problem. I don’t understand how to restore root access when I can’t even execute GRANT statements due to the lack of privileges.
Here’s what I get when running SHOW GRANTS FOR root:
But it returns nothing, implying there are no privileges to show. I'm in a deadlock situation here and could use some expert guidance on how to restore root privileges from this state.
Here’s what I get when running SHOW GRANTS FOR root:
Code:
@ 'localhost';
But it returns nothing, implying there are no privileges to show. I'm in a deadlock situation here and could use some expert guidance on how to restore root privileges from this state.