Accidentally forgot the database password,
At this point we just need to add in the database configuration file
Skip-grant-tables
Then restart the service, and then log in to the database without us entering the password.
This time I successfully login data, but accidentally and all the user to delete and can not log on, this time I changed the configuration file can be logged in to the database to add users, but after the addition of the user's command prompts me as follows:
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 ' 123 ' with GRANT OPTION;
ERROR 1290 (HY000): The MySQL server is running with the--skip-grant-tables option so it cannot execute this statement
This time we only need to flush privileges, in the addition of the user is OK,
mysql> flush Privileges;
Query OK, 0 rows affected (0.01 sec)
Mysql> Grant all privileges on *. * to identified by ' 123 ' with GRANT OPTION;
Query OK, 0 rows Affected (0.00 sec)
This time we have successfully done, and then log on to it.
If the error message is as follows:
Error:cannot Retrieve repository metadata (Repomd.xml) for Repository:installmedia. Verify its path and try again
You could try using--skip-broken to work around the problem
You could try Running:rpm-va--nofiles--nodigest
We just have to/etc/yum.repo.s under the Packetxxxx.repo and Redhat.repo two files removed, and then start on it,
I hope you can handle it, it's not so hard to look at the error message.
rhel6 mysql skip-grant-tables add user error Error 1290