Home >Database >navicat >Navicat database ip cannot be connected

Navicat database ip cannot be connected

angryTom
angryTomOriginal
2019-08-13 09:55:435206browse

Navicat database ip cannot be connected

When using navicat, sometimes we will encounter this situation. We can connect using localhost, but when using the IP address, navicat will report an error and cannot connect. The editor below will introduce to you the solution to the problem that the navicat database IP cannot be connected.

Recommended tutorial: navicat usage tutorial

Problem introduction:

1. Successful localhost connection:

Navicat database ip cannot be connected

2. Unsuccessful connection using ip:

Navicat database ip cannot be connected

Solution:

Enter mysql under windows:

C:\WINDOWS\system32>net start mysql
C:\WINDOWS\system32>mysql -uroot -p123456

PS: -p# The 123456 after ## is the password of the database, please change it.

Enter the following command at the mysql command line:

mysql> use mysql;

Grant remote connection permissions to all IPs with the user name root:

mysql> update user set host='%'where user='root';

Update configuration:

mysql> flush privileges;

After that, you can use tools such as navicat to remotely connect and operate the database.

The above is the detailed content of Navicat database ip cannot be connected. 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
Previous article:How to use patchnavicatNext article:How to use patchnavicat