Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the slow connection of Navicat to MySql database

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to solve the problem of Navicat connecting to MySql database slowly". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Project scenario:

Manipulate MySql database

Problem description:

When you connect to MySql database tables through Navicat, it is normal to open tables for the first time, but when you open other tables after not operating Navicat for a period of time, you will get stuck, and it will take a long time to respond.

Cause analysis:

My database is on the recently bought Tencent server. I wonder if the MySql database just installed is not configured properly, so I searched the Internet for this kind of problem, saying that MySql enabled Dns reverse parsing by default. I will try the following configuration methods.

Add such a field under the mysqlid of / etc/my.cnf:

Skip-name-resolve

After configuration, it is found that the problem still exists, and then through the query, it is found that there is an article that the Navicat client has a mechanism to keep the connection interval. The default is 240s, which means that the client will send a request to the MySql server every 240s to keep the database active.

However, because the interval set by Navicat is too long, the previous database connection has been disconnected. When we open a new table, Navicat will take the old connection to request and find that the old one is not available before applying for a new connection to request, which is why it takes us so long to open a table.

Solution:

Modify the connection retention interval of Navicat

Navicat-Edit database connection-Advanced-check keep connection interval-input box set to 30-Click OK!

Knowledge points to add:

The way to solve the slow mysql of Navicat remote connection

The development of an application system to connect to the company's test server mysql database connection is very slow, but the connection to the local mysql database is very fast, at first I think it may be caused by the network connection problem, after carrying out ping and route, I found that the network communication is normal, and the local connection discovery on the mysql machine is very fast, so the network problem is basically ruled out, so I want to see if it is the configuration problem of mysql. After querying mysql-related documents and web search, we found that a configuration seems to solve this problem, which is to add the following configuration parameters to the configuration file of mysql:

[mysqld]

Skip-name-resolve

The configuration file under linux is / etc/my.cnf, and the configuration file under windows is the my.ini file under the mysql installation directory. Note that the configuration is added under [mysqld]. After changing the configuration and saving it, then restart mysql and test the remote connection, and everything is restored.

This is the end of the content of "how to solve the problem of Navicat connecting to MySql database slowly". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report