When navicat is used, sometimes there will be a problem of linking to the server failure. Below we will introduce to you the solution to this problem.
Recommended tutorial: MySQL video tutorial
##1. First, make sure your Linux firewall has been turned off
If the company server firewall is too important and cannot be turned off, it will be more troublesome. You need to configure the properties under the firewall configuration file. If you still can't solve it, please continue reading.#2. If it is a cloud server, please confirm whether port 3306 has been set to open to the outside world
Here is the Alibaba Cloud server as an example. Alibaba Cloud The default port of the server is not open to the outside world. If you want to provide external access, you need to manually add rules to the security group. For detailed operations, please refer to the official document: https://helpcdn.aliyun.com/document_detail/25471.html?spm =5176.doc25468.2.4.RfJyPUIf you still can’t solve it, please continue reading below.3. Insufficient permissions problem
Prompt error:Warning: Using a password on the command line interface can be insecure.
ERROR 1130 (HY000): Host '192.168.3.134' is not allowed to connect to this MySQL server
Solution: 1. Enter the mysql database command line 2. Enter use mysql; 3. Set the root account password to 123456 to access the mysql server with any IP Enter grant all privileges on *.* to root@"%" identified by "password"; This is equivalent to granting all permissions to IP-xxx.xxx.xxx.xxx, including remote access permissions, % percent The number indicates that any IP is allowed to access the database. 4. Then enter flush privileges; 5. Restart MySQL on the Linux server##
The above is the detailed content of Why can't navicat connect to the server?. For more information, please follow other related articles on the PHP Chinese website!