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:
|
<<: JavaScript plugin encapsulation for table switching
>>: How to simply configure multiple servers in nginx
How to implement text icons through CSS /*icon st...
1. Under 800*600, if the width of the web page is...
To solve the problem that Deepin cannot start Goo...
The mysql connection must first be initialized th...
The equal-width layout described in this article ...
Let's look at the code first: ALTER TABLE rep...
MySQL master-slave replication allows data from o...
Error description: 1. After installing Nginx (1.1...
The effect to be achieved is: fixed zoom in twice...
Search online to delete duplicate data and keep t...
I saw that Taobao’s webpage uses import, while man...
This article example shares the specific code of ...
Requirements: The PC side and the mobile side are...
I have encountered the problem that MySQL can con...
Nginx is configured with the same domain name, wh...