Connect to mysql on linux from a dos prompt

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?


Who is Participating?
MySQL exists for Windows too; see 

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
use putty,

also you will have to make some changes in the linux server to allow connections from other machines... here are the steps..
jmsloanAuthor Commented:
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
jmsloanAuthor Commented:
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
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.