In order to securely set the Linux MySQL root permission, the Administrator account is not added after the setting .. Instead, I started to toss the database. There are many users in it, and the method of re-installation is not feasible .. Finally found a very good method !!
Step 1:
Servers with bad permissions ()
Server with MYSQL (B)
Stop the mysql service of machine A (service mysqld stop)
Rename the mysql folder in the mysql directory to mysql-old.
Download the mysql folder (the database folder, not the mysql directory) under/var/lib/mysql/on server B and upload it to server, then start mysql (service mysqld start)
Use phpmyadmin to enter after startup (do not forget when entering, because it has been replaced with mysql on server B, so the user name and password are in server B)
After logging on to the mysql database and entering the USERS table, you can see a lot of USERS (where the root user permission is N), and manually change all to Y. () Click to view the big picture.
In the last step, after modification, delete the mysql folder and change mysql-old to mysql! Start mysql! OK!
Note: Make sure to back up data when modifying mysql-old of server!