Solved

Connect to mysql on linux from a dos prompt

Posted on 2006-11-28
5
1,359 Views
Last Modified: 2009-07-29
I have mysql installed on linux.  I would like to connect to it from dos.  What do I need to install on my windows machine.

And what would the connection string be?

Thanks,

Jmsloan
0
Comment
Question by:jmsloan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 12

Expert Comment

by:str_kani
ID: 18031436
use putty, http://www.putty.nl/download.html

also you will have to make some changes in the linux server to allow connections from other machines... here are the steps..

http://help.hardhathosting.com/question.php/87
0
 
LVL 3

Author Comment

by:jmsloan
ID: 18032053
Currently I can run a batch file that opens up sqlplus run sqlplus commands that update oracle then closes.

I need to find the equivalant to do the same to a mysql database
0
 
LVL 3

Author Comment

by:jmsloan
ID: 18032141
Here is what is done for sqlplus at the dos prompt.

sqlplus username/password@database

To get mysql to work I would need to have a odbc driver set but what program would be equivalant to sqlplus
0
 
LVL 5

Expert Comment

by:dasmaer
ID: 18032247
linux uses scripts just like dos uses .bat files.

in the script put the command you want executing and then chmod to 777 e.g:
chmod 775 myscript

This makes the script exectuable. Then once you've ssh'd, or telnet'd in, you can just type "myscript" (without the quotes) and it'll run like a .bat file.
0
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 100 total points
ID: 18033192
MySQL exists for Windows too; see http://dev.mysql.com/doc/mysql/en/windows-installation.html 

Just install MySQL on your Windows computer and you can connect to your database from there exactly (EXACTLY) the same way you could from a Linux box:

mysql -h your_hostname -u your_username -p database_name
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question