LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,689

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
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 Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,645

Rep: Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 02:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration