MySQL skip grant tables add user error 1290
I forgot the database password,
At this time, we just need to add the
skip-grant-tables
Then restart the service and log in to the database without us entering the password
At this time, I successfully log in to the database, but I accidentally deleted all the users and couldn’t log in. At this time, I changed the configuration file to log in. I wanted to add users to the database, but after executing the add user command, I was prompted 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
At this time, we just need to flush privileges to add users,
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)
At this time, we have successfully completed, and then log in.
If an error is reported, the following information is given:
Error: Cannot retrieve repository metadata ( repomd.xml ) for repository: InstallMedia. Please 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 need to get to/etc/ yum.repo . s packetxxxx.repo and RedHat.repo Delete the two files and start again,
Read More:
- Add Samba user prompt failed to add entry for user
- Add samba user prompt Failed to add entry for user.
- How can Oracle query tables of other users without adding a table user name
- MySQL operation and maintenance slave_ skip_ errors
- MySQL – ERROR 1146 (42S02): Table ‘mysql.user’ doesn’t exist
- phpstudy Error while setting value ‘STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION
- MySQL partitions the existing tables of the data table
- Solve MySQL error 1698 (28000): access denied for user ‘root’ @’localhost ‘
- MySQL creates tables and sets auto increment of primary keys
- MySQL failed to add foreign key: SQL 1452 cannot add or update a child row:a foreign key constraint fails
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- Mysql Error:The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exist
- MySQL startup problem (ERROR 1045 (28000): Access denied for user’ODBC’@’localhost’ (using password: NO))
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- Error 1045 (28000) access denied for user ‘root’ @’localhost ‘appears in MySQL under Windows system
- Maven skip unit test- maven.test.skip And skipstests
- MySQL Workbench Failed to Connect to MySQL at 127.0.0.1:3306 with user root Bad handshake
- [resolved] superset failed to create admin user: error! User already exists user or attributeerror: ‘nonetype’‘
- Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’