• notice
  • Congratulations on the launch of the Sought Tech site

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

mysql-uroot-p

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:

/usr/local/mysql/bin/mysql-uroot-p

Execute the following command:

grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'ROOT-PASSWORD';

flush privileges;

exit

192.168.0.1 is the client ip connecting to the mysql server.If all are specified, it is represented by %.

Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+