MySQL Restore Root Privileges Windows 10

I’ve been stuck on this for hours now and I’ve tried all the solutions posted on this website and beyond and nothing seems to be working.

I am trying to connect my server to DVWA to test some of the pentesting tools and have been getting this error : Could not drop existing database SQL: Access denied for user ‘root’@’localhost’ to database ‘mysqldvwa’

For whatever reason, my root account for MySQL lost its privileges and I’ve gotten Access Denied for all the commands that I’ve tried. (SELECT, FLUSH Privileges etc).

For example for FLUSH PRIVILEGES; I am getting this error : Access denied; you need (at least one of) the RELOAD privilege(s) for this operation

I can login as root but my privileges seems to be gone. I also can’t create a new user and give that user new privileges, it will give me an error Access denied.

Running mysqld_safe –skip-grant-tables & on my cmd will give me the error that mysqld_safe is not recognized as an internal or external command

Typing Show Grants show me this

Grants for root@localhost

GRANT USAGE ON . TO ‘root’@’localhost’

GRANT ALL PRIVILEGES ON ‘database’.* TO ‘root’@’localhost’

The database here is my other schema from the past.

I’ve also tried this. https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html

But after trying this in the cmd, the command just hangs there.

Are there any other solutions out there?

Thank you!

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.