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

What if the Navicat remote connection MySQL cannot be connected

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what to do if the Navicat remote connection MySQL is not connected, I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article. Let's learn about it together.

I. can't connect to MySql server on '192.168.X.X'

This is because the mysql port is blocked by the firewall and you need to use linux to execute the following instructions:

1 / sbin/iptables-I INPUT-p tcp-- dport 3306-j ACCEPT

2 、 # / etc/rc.d/init.d/iptables save

3 、 # / etc/init.d/iptables restart

4. Check whether the port is enabled # / etc/init.d/iptables status

II. 1130-host. Is not allowed to connect to this MySql server

Method 1: equate the user table host of mysql to the data host=% of localhost

Mysql-u root-p password > use mysql;mysql > update user set host ='% 'where user =' root';mysql > FLUSH PRIVILEGES;mysql > select host, user from user

Method 2:

1) Connect to the mysql server from any host

GRANT ALL PRIVILEGES ON. TO 'root'@'%' IDENTIFIED BY' password' WITH GRANT OPTION;FLUSH PRIVILEGES

2) only allow user root to connect to the mysql server from a host whose ip is 192.168.x.x, and use password as the password

GRANT ALL PRIVILEGES ON. TO 'root'@'192.168.x.x' IDENTIFIED BY' password' WITH GRANT OPTION;FLUSH PRIVILEGES

3) if you want to allow the user root to connect to a database on the mysql server from the host with ip 192.168.x.x', and use password as the password

GRANT ALL PRIVILEGES ON database name. * TO 'root'@'192.168.x.x' IDENTIFIED BY' password' WITH GRANT OPTION;FLUSH PRIVILEGE is all the contents of this article "what to do if Navicat remote connection MySQL is not connected". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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