What are the eight life cycle hook functions of Vue>>>
Colleagues reported that a MySQL 5.6 creation user could not be authorized, and prompted [error 1044 (42000): access denied for user ‘root’ @’localhost ‘]. As follows:
mysql> grant all on xxx.* to xxx@'localhost' identified by 'xxx';
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'xxxx'
mysql>
The root user should not have permission. Check the permissions
[root@localhost][mysql]> select current_user() from dual;
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
[root@localhost][mysql]> select host,user from user where user='root';
+-----------+------+
| host | user |
+-----------+------+
| % | root |
| localhost | root |
+-----------+------+
2 rows in set (0.00 sec)
[root@localhost][mysql]> show grants for root;
+--------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@% |
+--------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' WITH GRANT OPTION |
+--------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
It looks ok. Just look at grant_ Priv’s permission is up
[root@localhost][mysql]> SELECT host,user,password,Grant_priv,Super_priv FROM mysql.user;
+-----------+---------+-------------------------------------------+------------+------------+
| host | user | password | Grant_priv | Super_priv |
+-----------+---------+-------------------------------------------+------------+------------+
| % | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | N | Y |
+-----------+---------+-------------------------------------------+------------+------------+
1 rows in set (0.00 sec)
Find grant_ Priv permission is n, that is to say, the root user cannot authorize other users. Try y instead
[root@localhost][mysql]> UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root';
[root@localhost][mysql]> FLUSH PRIVILEGES;
Try adding users again, no problem
mysql> grant all on xxx.* to xxx@'192.168.%' identified by 'test1249';
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Similar Posts:
- [Solved] MYSQL8.0 Error: the user specified as a definer (‘root’@’%’) does not exist
- mysql ERROR 1044 (42000): Access denied for user ‘
- mysql 1449 The user specified as a definer does not exist
- [Solved] MYSQL Error: this authentication plugin is not supported
- [Solved] MYSQL ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’
- MYSQL ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- MYSQL Login Error: mysqladmin: connect to server at ‘localhost’ failed
- mysql 1142 – SELECT command denied to user ‘root_ssm’@’localhost’ for table …
- [Solved] MYSQL Remote Connect Error: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)