Home > Database > navicat > Navicat cannot connect to MySQL remotely

Navicat cannot connect to MySQL remotely

angryTom
Release: 2019-08-15 15:29:49
Original
4302 people have browsed it

Navicat cannot connect to MySQL remotely

navicat is a powerful visual database management tool. navicat is built with an intuitive graphical user interface, allowing you to create, organize, access and share in a safe and simple way. information. Many users often use navicat software to manage local database files. Today I will introduce to you the solution to the problem that navicat cannot connect to MySQL remotely.

Recommended tutorial: navicat graphic tutorial

##一.can't connect to MySql server on '192.168. 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 open#/etc/init.d/iptables status

二.1130-host ... is not allowed to connect to this MySql server

Method 1: Set the mysql user table host equal to the localhost data host=%

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

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;
Copy after login
2) Only allow user root to connect to the mysql server from the host with ip 192.168.x.x and use password As password
GRANT ALL PRIVILEGES ON . TO 'root'@'192.168.x.x' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH   PRIVILEGES;
Copy after login

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

GRANT ALL PRIVILEGES ON 数据库名.* TO 'root'@'192.168.x.x' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH   PRIVILEGE
Copy after login

The above is the detailed content of Navicat cannot connect to MySQL remotely. 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