Summary of MySQL remote connection
For a long time, I have never had the habit of summing up the problems encountered in the project. I feel that from today on, regardless of the problems encountered, note that it is necessary to summarize the problem solving ideas and processes at work. So today I will summarize my experience in creating MySQL services in Linux and remote connection through Windows.
Step 1: The project uses a cloud host, so it is easier to install it. Note that only relevant files should be installed as much as possible. Pay attention to the files listed in the list.
Command |
Note |
Yum list mysql * |
List mysql installation packages |
Yum install mysql-server |
Install the corresponding application |
Step 2: run the mysql command to access the mysql command line and modify the remote connection of the root user of mysql.
Grant all privileges on *. * to root @ '%' identified by 'xxxxx'; // Modify remote Permissions
Flush privileges; // refresh the permission
Step 3: Use the navicat tool for remote connection access in Windows. Note that if the firewall of Linux is enabled, the connection will not succeed, I didn't think of this problem yesterday, so I couldn't connect to it, And I wasted a lot of time.
Step 4: Check the Firewall Status of Linux and disable it. You can also use other better methods.
Service iptables status // view the status
Service iptables stop // disable
Then you can access it through Windows remote connection.
Conclusion: Although the process is very simple, it is a headache if you do not notice the firewall problem.
Enable MySQL remote connection in Linux
How to Use SQLyog to remotely connect to MySQL
Set Ubuntu to allow remote connection to MySQL
MySQL remote connection settings
In Linux, MySQL cannot be remotely connected.
MySQL remote connection prompt in Linux: ERROR 1045 (28000)
MySQL installation and remote connection configuration in Ubuntu
This article permanently updates the link address: