Solved

Connect to mysql on linux from a dos prompt

Posted on 2006-11-28
5
1,346 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
5 Comments
 
LVL 12

Expert Comment

by:str_kani
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now