First install the Navicat tool on the Windows system,
There are two ways to connect to a database:
Method One: Connect with Navicat's own ssh
1. First we create a new connection in the Navicat
1.1 General-only fill in (Database login username and password)
PS: hostname and IP address (localhost), port (3306) These don't have to change.
1.2 Then click-ssh-(here to configure the IP address of the server where MySQL resides and the host's user name and password)
1.3 Click the test button in the lower left corner.
###############################################################
Method Two: Remote connection to MySQL database using IP address
1. First open the Navicat new connection, this time we do not fill in the host name in the General page localhost, but directly fill out our remote server IP address
1.1 Username, password and port (3306) These are the same (fill in the database user name, password)
1.2 Then we click on the test, still cannot connect. We need to execute the following statement in MySQL (open MySQL remote permissions)
1.3 GRANT all privileges on . To ' myuser ' @ '% ' identified by ' MyPassword ' with GRANT OPTION;
Ps:myuser change to your database username typically root mypassword change to database login password
1.4 After opening the remote permissions, we also need to modify the next vim/etc/my.cnf file
Modify bind-address = 127.0.0.1 to bind-address = 0.0.0.0
1.5 After modifying the configuration file, of course we have to flush the MySQL service (systemctl restart MySQL) or (systemctl stop MySQL)--(systemctl start MySQL)
At this point, there are two ways we can operate MySQL on Windows.
Connecting MYSQ databases using Navicat