In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how mysql can not connect to a remote server. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
How to solve the problem that mysql cannot connect to the remote server: log in to the mysql server first, then use the statement to modify the access permissions of all hosts, the code is [update user set host ='% where user= 'root'], and finally execute the following command directly to solve the error report.
How to solve the problem that mysql can not connect to a remote server:
After logging in to the mysql server, you can use the following query statement to see if remote access is enabled. The query results show that only local root users are allowed to connect.
Select host,user,password from user
You can use the following statement to modify the access permissions of all hosts
Update user set host ='% 'where user =' root'
However, after executing this statement, I found that there was an error, reporting ERROR 1062 (23000): Duplicate entry'%-root' for key 'PRIMARY'.
Later, I looked for it on the Internet and said it was caused by the "only index"! Let's check whether the incoming data is "duplicate", but this is the user table, and I didn't insert the data manually, and of course I can't delete the data from the user table at will, so I found another way to ignore the error directly.
Just execute the following command directly
Flush privileges; about mysql can not connect to the remote server method to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.