Detailed explanation of Navicat's slow remote connection to MySQL

Detailed explanation of Navicat's slow remote connection to MySQL

The final solution is in the last picture

If you connect to a remote database ( Linux system ) and it is very slow (the specific symptom is that the first connection to open all tables does not seem to be very slow, but after a few minutes, opening any table is very slow, even if the table has very little data), we use the command to find the configuration file (mysql5.7)

sudo vi /etc/my.cnf

At this time, you will generally be prompted to enter a password, so after you enter the password, execute the edit command

sudo vi /etc/my.cnf

Click the insert key on the keyboard to enter the edit mode, find the corresponding position, and add the required configuration (as shown below)

[mysqld]
#Remote connection ignores parsing (just to make it connect faster, the official instructions are there, we just need to know the configuration)
skip-name-resolve
#Set the number of connections (this can be used to modify the maximum number of connections)
max_connections=1000

When you are done, press the Esc key and enter the command to save.

:wq

Use the command to restart the mysql service (you may also need to enter a password, and restart after entering it to make the changes take effect)

systemctl restart mysqld

MySQL executes the following command to see if the maximum number of connections has been modified successfully

show variables like 'max_connections'

Test your database. Of course, the first connection seems to open the table faster, but it is still very busy after a few minutes. Opening a table is as slow as copying the MySQL ancestor's grave. This is when the big move comes in.

Check the box to keep the connection, and change the default 240 to 60 (seconds), or even 30, so that the database can be kept active for several minutes or hours, ready for CRUD at any time.

This is the end of this article about the solution to Navicat's slow remote connection to MySQL (and the database connection error "Too many connections"). For more related content about Navicat's slow remote connection to MySQL, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Solve the problem that Navicat cannot connect to the MySQL server in the Centos system in VMware
  • Perfect solution to the problem that Navicat cannot connect after installing mysql in docker
  • About the problem of Navicat connecting to MySql database slowly
  • Navicat for MySQL 15 Registration and Activation Detailed Tutorial
  • How to remotely connect to MySQL database with Navicat Premium
  • Solve the problem of error 10038 when connecting to MySQL remotely in Navicat
  • Navicat for MySQL 11 Registration Code\Activation Code Summary
  • Navicat Premium operates MySQL database (executes sql statements)
  • Common errors and solutions for connecting Navicat to virtual machine MySQL
  • When Navicat Premium connects to the database, the error message appears: 2003 Can't connect to MySQL server on''localhost''(10061)
  • Detailed explanation of how to create MySql scheduled tasks in navicat
  • Solution to the problem that Navicat cannot remotely connect to MySql server
  • How to use Navicat to operate MySQL

<<:  JavaScript plugin encapsulation for table switching

>>:  How to simply configure multiple servers in nginx

Recommend

Analysis of the HTML writing style and reasons of experienced people

1. Navigation: Unordered List vs. Other Label Ele...

How to customize Docker images using Dockerfile

Customizing images using Dockerfile Image customi...

Detailed explanation of Vue custom instructions

Table of contents Vue custom directive Custom dir...

This article will show you the principle of MySQL master-slave synchronization

Table of contents Brief Analysis of MySQL Master-...

Vue implements 3 ways to switch tabs and switch to maintain data status

3 ways to implement tab switching in Vue 1. v-sho...

Example of deploying Laravel application with Docker

The PHP base image used in this article is: php:7...

How to install mysql on centos and set up remote access

1. Download the mysql repo source $ wget http://r...

MySQL 8.0.15 installation tutorial for Windows 64-bit

First go to the official website to download and ...

jQuery plugin to achieve image comparison

This article example shares the specific code of ...

How to use http and WebSocket in CocosCreator

Table of contents 1. HttpGET 2. HTTP POST WebSock...

JS Decorator Pattern and TypeScript Decorators

Table of contents Introduction to the Decorator P...

A brief introduction to the simple use of CentOS7 firewall and open ports

Overview (official has more detailed description)...

JavaScript drag time drag case detailed explanation

Table of contents DragEvent Interface DataTransfe...