Home > Database > navicat > body text

Navicat database ip cannot be connected

angryTom
Release: 2019-08-13 09:55:43
Original
5145 people have browsed it

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
Copy after login

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;
Copy after login

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

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

Update configuration:

mysql> flush privileges;
Copy after login
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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!