This article is based on this kind of question on the Internet has many similar answers, such as various changes to my.cnf, or change MySQL Settings, Navicat Settings. However, WHEN I encountered these problems, I tried to search for many answers, but none of them could be solved.
My MySQL is built in the pagoda Linux panel on the Ali cloud server. If there is a similar situation as I have entered your server management consoleA firewallIn theThe next one is in the upper rightAdd rulesOpen port number in3306
Once confirmed, the connection is successful