0

We have a replication server that we use to query DB. Each port number on replication represents the original server where each database lies for us to query.

So i want to do e.g

rsh replicationServer:3306 "select x from y"

But can't figure the exact syntax. Perhaps there is an alternative method but i can't find from my research.

user3303266
  • 371
  • 1
  • 9
  • 22
  • I don't think that what you are attempting is possible. Imagine that it was, that would mean that anyone knowing the server name and port number could act on the database (for instance, truncate all tables). DB clients establish connections to the DB using known credentials, and only when the connection is granted, they can act according to the **permitted** actions (as defined for the connecting user). – FDavidov Sep 05 '18 at 11:39
  • Ok lets forget the query. How do i do a regular bash command on the remote server on that port e.g rsh servername:3306 "ls" – user3303266 Sep 05 '18 at 15:08
  • If check the command's specifications (e.g. visit [here](https://www.computerhope.com/unix/ursh.htm?), I don't see how to specify a particular port number. Still, you may google a little bit for alternative command's documentation (also try `man rsh`). – FDavidov Sep 06 '18 at 07:32

0 Answers0