LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2015, 11:32 AM   #1
newuser85
LQ Newbie
 
Registered: Aug 2015
Posts: 15

Rep: Reputation: Disabled
How to connect to sql server from cygwin


Hi,

I want to connect to my sql server server on windows machine from Cygwin using shell script. for that whether we want to install any third party tool to connect to the sql server from shell script. Please advice.

Thanks in advance.
 
Old 10-16-2015, 04:51 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by newuser85 View Post
Hi,

I want to connect to my sql server server on windows machine from Cygwin using shell script. for that whether we want to install any third party tool to connect to the sql server from shell script. Please advice.
Cygwin has a mysql client https://cygwin.com/cgi-bin2/package-....45-1&grep=sql.
 
Old 10-18-2015, 06:49 AM   #3
newuser85
LQ Newbie
 
Registered: Aug 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi,

Thanks for your reply. I would like to test the database connection with the microsoft sql server from within the script. It would be a great help if someone can give the syntax to test connect the microsoft server.

thanks.
 
Old 10-18-2015, 08:14 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
the shell (bash) itself cannot connect to any database, you need to use another language (python, perl, java ...). All of them have database drivers, you need to install that and read the documentation on how to connect.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] installing webacula - 'Can't connect to SQL server' - Ubuntu server 10.04 Pomardako Linux - Software 6 02-08-2013 01:17 PM
Unable to connect MS SQL server 2008 Remote Server through SQUID proxy server samank75 Linux - Server 5 01-19-2012 09:19 PM
Connect to MS SQL server using C++ in RHEL funkyaryan81 Linux - Newbie 1 08-11-2011 11:34 AM
SQL Anywhere to connect to MySQL Server crackyblue General 0 06-22-2009 07:42 PM
Connect to SQL Server dhome Linux - Software 1 03-08-2004 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration