One day accidentally changed the root of the permissions to the smallest (only login, nothing can do), this may be urgent to me. Heavy-loaded words too troublesome, and there are many users, one after another do not know when.
Then I thought of a way, the current server to stop the MySQL service, the MySQL data directory under the MySQL directory renamed to Mysql_old, to another server under the MySQL directory/data/mysql directory to copy to the corresponding directory, Then start the MySQL service, log in to phpMyAdmin using the root account under another server, and you will see that you have full access to the operation, but there is no database project and user information in the current server in this data table. Then find the Mysql_old database, go in to the user table, find the first root localhost table segment, modify: Change all n to Y. Then stop the MySQL service, the newly copied MySQL deleted, the mysql_old renamed to MySQL, and then start the server with root login, found that the permissions have all returned.
MySQL Database root privilege loss Solution