This manual says a toolforge user can connect to DB replicas using MySQL_Workbench: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#MySQL_Workbench
I have used this method in ~2016 and it worked, but after that I didn't used it to 2024.
Now I tried to use it again: I created connections to ruwiki and ukwiki using this manual:
I had written this to my C:\Windows\System32\drivers\etc\hosts
127.0.0.1 ruwiki.web.db.svc.wikimedia.cloud 127.0.0.1 ukwiki.web.db.svc.wikimedia.cloud
I opened both connections in MySQL Workbench (and got this warning)
I runned PuTTY ssh connection to Toolforge, runned a bot in a local IDE for debugging and it crashed on second line
var ruconnect = new MySqlConnection(connection string); ruconnect.Open();
with message
SocketException: The connection has not been established because the destination computer rejected the connection request 127.0.0.1:3306
All used logins/passwords/key files are valid, because I have successfully used it to connect to Toolforge using WinSCP and PuTTY now, also I have used the same key file in 2016 to successfully connect to DB replicas, and I don't changed my keys since that.
@dcaro maybe you can say something about it? Maybe there are another method how can I debug my bot on local PC, if it uses DB replica connection?