Make windows Server server Mysql database can be connected remotely

Preface

Recently, I was playing with Tencent Cloud Server and built a Mysql database on the Windows Server server. For the sake of convenience, I wanted to use Navicat on my computer to manage the server-side database.


One, configure Mysql

Enter the following commands in CMD:

mysql -u root -p
use mysql;
update user set host = '%' where user = 'root';
select host, user from user;
flush privileges;

As shown below:
Configuration interface

Two, configure the server firewall

Add mysql 3306 port rules for the server
Insert picture description here

Insert picture description here
Insert picture description here


Three, test

Use Navicat to create a new connection, enter the public network IP in the host field and
Insert picture description here
click test connection to
Insert picture description here
complete

Guess you like

Origin blog.csdn.net/qq_40789901/article/details/113137238