Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8510589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:44:49+00:00 2026-06-11T03:44:49+00:00

When I want to access a Mysql server which only lets local accesses, first

  • 0

When I want to access a Mysql server which only lets local accesses, first I need to SSH to that server and then run “mysql” command. However I want to run it by one command.

When I execute this command terminal stops and the cursor gets frozen after 5 or 10 seconds.

ssh arash@10.0.3.1 "/usr/bin/mysql -u db_username -pdfdasdfCASDF -D db_12dgj

Does anyone know which part is wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:44:51+00:00Added an answer on June 11, 2026 at 3:44 am

    You need to make sure you got a pty for readline. Use the -t option of ssh.

     ssh -t -t user@server '/usr/bin/mysql -u{mysqlUser} -p{mysqlPassword} {mysqlDB} -e "select * from table"' 
    

    man ssh(1):

         -t      Force pseudo-tty allocation.  This can be used to execute arbi-
                 trary screen-based programs on a remote machine, which can be
                 very useful, e.g., when implementing menu services.  Multiple -t
                 options force tty allocation, even if ssh has no local tty.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to access MySQL through ruby on a shared linux server. I figure
I want to access a MySQL database and I want to read+write data from+to
I want to access a MySQL database from Java, but remote connection is disabled
I want to use JDBC to access a MySQL database. What or will an
I want to access java script's return value , which in is in a
I want to access the session variable which I declared in the another php
I have an Access file on a server which my colleagues will update regularly
I have a Server: Localhost via UNIX socket with a mySQL database which I
What I want to do(and have done) is to access the same MySQL db.
I have a dev MySQL server, on which there are many databases, and most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.