Solve the problem that Navicat cannot connect to MySQL on the Linux server

Solve the problem that Navicat cannot connect to MySQL on the Linux server

At the beginning, I felt sad. The screenshots are as follows:

After some trouble, the solution is as follows:

First, make sure that port 3306 of MySQL on the Linux service is open to the outside world.

Switch to the directory: /etc/sysconfig , edit iptables , and copy this into it: " -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT ". The effect is as shown in the figure:

Then restart the firewall

service iptables restart

mysql opens root permissions (executed under mysql command)

Grant permissions: grant all privileges on *.* to 'root'@'% 'identified by 'password' with grant option

Refresh the privilege list: flush privileges

Modify the mysqld.cnf file in /etc/percona-server.conf.d directory

Comment out "bind 127.0.0.1"

Uncomment the line “bind-address = 0.0.0.0”

Finally restart mysql

service mysql restart

So happy, it succeeded, the screenshots are as follows:

*****************************************************************************************************

Energy is limited, and there are too many ideas. Just focus on doing one thing well.

I'm just a programmer. Write good code within 5 years, polish every word of technical blogs, and insist on zero copy and originality . The purpose of blogging is to exercise logical reasoning, deepen the systematic understanding of knowledge, and practice writing. If it happens to be helpful to others, it is really a happy thing.

*****************************************************************************************************

Summarize

The above is the editor's introduction to solving the problem that Navicat cannot connect to MySQL on the Linux server. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • When Navicat Premium connects to the database, the error message appears: 2003 Can't connect to MySQL server on''localhost''(10061)
  • How to solve the 10060 unknow error when Navicat remotely connects to MySQL
  • Navicat remote connection to MySQL implementation steps analysis
  • Solve the 1251 error when establishing a connection between mysql and navicat
  • Detailed explanation of the idea of ​​installing mysql8.0.11 and changing the root password and connecting navicat for mysql
  • Solution to 1045 error when navicat connects to mysql
  • About the problem of Navicat connecting to MySql database slowly

<<:  Javascript combined with Vue to achieve automatic path finding for any maze image

>>:  MySQL UNION operator basic knowledge points

Recommend

Tutorial on customizing rpm packages and building yum repositories for Centos

1 Keep the rpm package downloaded when yum instal...

Detailed example of deploying Nginx+Apache dynamic and static separation

Introduction to Nginx dynamic and static separati...

The difference between GB2312, GBK and UTF-8 in web page encoding

First of all, we need to understand that GB2312, ...

Echarts implements switching different X-axes in one graph (example code)

Rendering If you want to achieve the effect shown...

Webpack builds scaffolding to package TypeScript code

Create a folder Directory structure: dabaots Init...

Is it necessary to create a separate index for the MySQL partition field column?

Preface Everyone knows that the partition field m...

Analysis of implicit bug in concurrent replication of MySQL 5.7

Preface Most of our MySQL online environments use...

Detailed steps to install MySQL on CentOS 7

In CentOS7, when we install MySQL, MariaDB will b...

JQuery implements hiding and displaying animation effects

This article shares the specific code of JQuery t...

WeChat applet implements the Record function

This article shares the specific code for the WeC...

How to use js to determine whether a file is utf-8 encoded

Conventional solution Use FileReader to read the ...

MySQL tutorial thoroughly understands stored procedures

Table of contents 1. Concepts related to stored p...