Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize MySQL remote connection through Navicat

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to achieve MySQL remote connection through Navicat". In daily operation, I believe many people have doubts about how to achieve MySQL remote connection through Navicat. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to achieve MySQL remote connection through Navicat". Next, please follow the editor to study!

When we use Navicat directly to connect through IP, we will report all kinds of errors, so what should we do? Today, the editor will introduce the process of remote connection through Navicat. If you need it, you can refer to it.

Using Navicat directly to connect via IP will report various errors, such as Error 1130: Host '192.168.1.80' is not allowed to connect to this MySQL server.

After personal verification, the solution is as follows:

Authorization law:

1. First use localhost to log in to the database you want to connect remotely

two。 Open a command prompt window and enter the following command:

Mysql > grant all privileges on *. * to 'root'@'%' identified by' 123456 'with grant option;Query OK, 0 rows affectedmysql > flush privileges;Query OK, 0 rows affected

The first sentence is that given the permission of the remote connection, you only need to set the user name and password of the connection according to the root and 123456 in the modification statement of the personal database.

The second sentence is to refresh the database so that permissions take effect immediately.

3. In general, you can connect to the database remotely, but sometimes the following error occurs: 2003-Can't connect to MySQL server on '192.168.1.80' (10038).

The error is that the firewall of the server (the server is the win7 system) intercepts your connection. Then turn off the firewall and you can connect.

Use the cmd command to connect to the remote database and do not want to use any tools to connect to the remote database.

I made a mistake on the command line. ERROR 2003: Can't connect to MySQL serveron "192.168.1.80"

The reason for this error is the same as above, which is blocked by the firewall.

After the above steps, for those who use WIN7 to build a local area and remotely connect to the MySQL database on WIN7, they can normally connect to the database development.

PS: turn off WIN7 Firewall not only under the control panel, but also in the service

Change the property to manual or disable, and then turn off the service.

Firewalls

There are two ways:

I. service mode

View firewall status:

[root@centos6 ~] # service iptables status

Iptables: the firewall is not running.

Turn on the firewall:

[root@centos6 ~] # service iptables start

Turn off the firewall:

[root@centos6 ~] # service iptables stop

II. Iptables mode

Enter the init.d directory first, and use the following command:

[root@centos6 ~] # cd / etc/init.d/

[root@centos6 init.d] #

And then

View firewall status:

[root@centos6 init.d] # / etc/init.d/iptables status

Temporarily turn off the firewall:

[root@centos6 init.d] # / etc/init.d/iptables stop

Restart iptables:

[root@centos6 init.d] # / etc/init.d/iptables restart

At this point, the study on "how to achieve MySQL remote connection through Navicat" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report