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

Suddenly I can't connect to phxsql.

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The business said that in recent days, the phxsql could not be connected for some time in the evening, but it was fine after a while and could be connected again. I think since it can be connected, it should not be the problem of the authorization table mysql.user. If there is a problem with the authorization, it will always be unable to connect, and usually no one will change the connection configuration.

The solution uses a very frustrating method, every 10 seconds to connect phxsql, to do show databases action, a few days later, the business said that the connection is not available, so query the log, really can not connect, the error message is as follows

Root@netbank:~# mysql-h database machine-upright bigolive'- p 'password-P54321 yycallERROR 1045 (28000): Access denied for user' xxx'@'xxx.xxx.xxx.84 (using password: YES)

I went to the mysql.user table and found that there was no authorization for xxx.xxx.xxx.84 as an IP, so it was normal that the connection could not be made.

Query the IP of the business machine and find that there is indeed 84 this IP, but this is Unicom IP

Ifconfig | grep cast | awk-F''{print $2}'| awk-F:'{print $2} 'xxx.xxx.xxx.202xxx.xxx.xxx.84xxx.xxx.xxx.13

The reason for not being connected is that business machines do not always connect to phxsql through telecom IP. Sometimes, because of network problems, the IP of Unicom is used to connect phxsql when the road of telecom is blocked, while telecom ip is authorized, and the ip of Unicom is not authorized, which leads to failure of connection. The solution is to license all ip once, mobile, Unicom, education network, intranet, once.

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