Tag Archives: 1142 – SELECT command denied to user ‘root_ssm’@’localhost’ for table …

mysql 1142 – SELECT command denied to user ‘root_ssm’@’localhost’ for table …

A super detailed tutorial: springboot integrates mybatis plus>>>

Use client authorization (Navicat premium 12)

1. Login MySQL with root

2. To create a new query, enter the command:

use mysql;

select * from user where user=’root_ ssm’;

the user name to be authorized is written in the condition following the SQL statement where

3. Execute the statement to view the user’s information

The value in the red part of the icon is “n”, which means that there is no permission. Just change it to y

change all columns with the value of ‘n’ to ‘y’, and remember to restart the service after the change

2. Command line client using MySQL 2

look at ‘root’_ SSM ‘user information

use mysql;

 

select * from user where user='root_ssm';

  

modify the localhost permission of root user

according to the column names in the query results, write the update statement one by one to modify

update user set Select_pri='Y' where user='root_ssm'

refresh the MySQL system permission related table after all the changes are completed:

flush privileges;

after that, restart the MySQL service and you will have all the permissions