Accidentally forgot the Database Password,
In this case, you only need to add
Skip-grant-tables
Then restart the service and log on to the database again.
At this time, I successfully logged on to the data, but accidentally deleted all the users and failed to log on. At this time, I changed the configuration file and logged on to the database to add users, however, after executing the Add USER command, the following prompt is displayed:
ERROR 1290 (HY000): The MySQL server is running with the -- skip-grant-tables option so it cannot execute this statement
Mysql> grant all privileges on *. * to identified by '000000' with grant option;
ERROR 1290 (HY000): The MySQL server is running with the -- skip-grant-tables option so it cannot execute this statement
In this case, we only need to flush privileges and add the user as OK,
Mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
Mysql> grant all privileges on *. * to identified by '000000' with grant option;
Query OK, 0 rows affected (0.00 sec)
At this time, we have done it successfully, and then we can log on again.
If the following error is reported:
Error: Cannot retrieve repository metadata (repomd. xml) for repository: InstallMedia. Please verify its path and try again
You cocould try using -- skip-broken to work around the problem
You cocould try running: rpm-Va -- nofiles -- nodigest
We only need to delete the packetxxxx. repo and RedHat. repo files under/etc/yum. repo. s and then start the file,
I hope you can solve this problem. It is not difficult to check the error message.