How to authorize remote IP connections
The newly installed MySQL does not have remote access permissions by default, so it cannot connect to MySQL externally.This is very inconvenient for the data that wants to call MySQL remotely.Let's take a look at how to set up to allow remote connections to the MySQL database.
Login to MySQL
If you cannot log in, you can use find/-name mysql to search for the path of the mysql program, for example, the path of the mysql program is :/usr/local/mysql/bin/mysql, we can log in like this:
Execute the following command:
grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'ROOT-PASSWORD';
192.168.0.1 is the client ip connecting to the mysql server.If all are specified, it is represented by %.