Restore the MySQL root user’s full privileges in Windows

1. Stop MySQL service. Run services.msc as administrator and stop it.

2. Run cmd.exe as administrator.

3. Execute:

c:xamppmysqlbinmysqld.exe --skip-grant-tables

4. Run another cmd.exe as administrator.

5. Execute:

c:xamppmysqlbinmysql.exe

6. Execute query:

UPDATE mysql.USER SET Grant_priv='Y', Super_priv='Y' WHERE USER='root';
FLUSH PRIVILEGES;

7. Close cmd windows.

8. Kill mysqld process from processes list in task manager.

9. Start MySQL service. Run services.msc as administrator and start it.

10. Open phpmyadmin, login and execute:

GRANT ALL ON *.* TO 'root'@'localhost';
Categories: MySQL Tags: , , , , , , ,
%d bloggers like this: