MySQL Error: errorCode 1130, state HY000 [How to Solve]

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:

    1. switch to the MySQL installation directory and execute: MySQL – U root – P enter the password

    1. execute the command to authorize the user: grant all privileges on. To ‘root’ @ ‘%’ identified by ‘root’; (%) It means that after all ip

    1. execute the above commands, refresh the permissions with the following command: flush privileges

    restart MySQL service

Read More: