Home >Database >navicat >How to authorize remote access in navicat

How to authorize remote access in navicat

angryTom
angryTomOriginal
2019-08-05 15:09:526435browse

How to authorize remote access in navicat

Navicat for MySQL is a commonly used database management software for MySQL database. It supports a single program and can be connected to MySQL and MariaDB at the same time. This fully functional front-end software provides an intuitive and powerful graphical interface for database management, development and maintenance. So how to use this software to remotely access the MySQL database?

Recommended tutorial: MySQL introductory video

1. Create a new connection and set the connection information. Just enter the IP address of the host that needs to be connected remotely in the host name/IP address.

How to authorize remote access in navicat

But using Navicat directly to connect through IP will report various errors, for example: Error 1130: Host '192.168.1.80 ' is not allowed to connect to this MySQL server.

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

How to authorize remote access in navicat

2. Open the command prompt window , enter the following command:

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

The first sentence is to give the permissions 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 personal database modification statement

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

How to authorize remote access in navicat

#3. Generally, you can connect to the database remotely, but sometimes the following error will occur: 2003 - Can't connect to MySQL server on '192.168 .1.80'(10038).

This error is that the firewall of the server (the server is a win7 system) has intercepted your connection. Then turn off the firewall and you can connect.

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

An error was reported in 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, it is blocked by the firewall.

PS: In addition to turning off the WIN7 firewall under the control panel, you must also turn it off in the service

The above is the detailed content of How to authorize remote access in navicat. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn