MySQL reports an error: errorcode 1130, state HY000
Scenario: the following error is reported during springboot startup:
The XML configuration is as follows:
It can be started normally when writing 127.0.0.1 or localhost. After rewriting 192.168. X.x, an Error 1130 is reported.
Reason: MySQL does not have this permission
Solution:
-
- switch to the MySQL installation directory and execute: MySQL – U root – P enter the password
-
- execute the command to authorize the user: grant all privileges on. To ‘root’ @ ‘%’ identified by ‘root’; (%) It means that after all ip
-
- execute the above commands, refresh the permissions with the following command: flush privileges
- restart MySQL service