lost privileges to root via mysql workbench...please help, site down

June 20, 2018 338 views
MySQL Ubuntu 16.04

Please help!...

I am facing a huge problem..i had access to database through MySQL workbench but one of my coworkers accidentally went on to users and privileges and revoke them...he thought he was deleting another user.

Now I can't access my information schema on mysql workbench and all my privileges are gone....i am logging through root...also my website is down becaause there are no other users...i am able to login to mysql via mysql -h 127.0.0.1 -u root but i can't seem to add or get my privileges back......

mysql> show grants for 'root';
ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'
mysql> SHOW GRANTS FOR 'root'@'localhost';
+--------------------------------------------------------------+
| Grants for root@localhost |
+--------------------------------------------------------------+
| GRANT USAGE ON . TO 'root'@'localhost' |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+--------------------------------------------------------------+
2 rows in set (0.00 sec)

.......................................................................................................

Be the first one to answer this question.