How to connect with Linux server and fetch output

HI
is there any way to connect Linux db server to fetch the output using commands , if yes please help …