LinuxQuestions.org
Register a domain and help support LQ
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 11-15-2002, 03:19 AM   #1
puru_09
Member
 
Registered: Jul 2002
Posts: 33

Rep: Reputation: 15
how to connect to the mysql


how can i connect to the database server which is running on window. there are two servers withh i wanted to connect one is SQL Server It is running on Window NT Server and other is MySQL Server it is also running on Window NT Server. This server is accessible from my Linux 7.3 OS but when i connect it thru my Java program. the program shows me an error of "Unknown Server". how can i access it from my program
 
Old 11-15-2002, 03:37 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Do you have the JDBC module installed for MySQL so Java knows about the database? If not get it from http://www.mysql.com/products/connector-j/index.html

cheers

Jamie...
 
Old 11-15-2002, 04:23 AM   #3
puru_09
Member
 
Registered: Jul 2002
Posts: 33

Original Poster
Rep: Reputation: 15
thanks for your reply. but will it work because my programm works on MySQL which is on Linux (localhost) but it wont able to connect to MySQL on Window NT
 
Old 11-15-2002, 04:28 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
The operating system should make no differnce. You are simply connection to a database on a host, wether its the local host running linux or a remote host running NT.

cheers

Jamie...
 
Old 11-15-2002, 05:20 AM   #5
puru_09
Member
 
Registered: Jul 2002
Posts: 33

Original Poster
Rep: Reputation: 15
dear jharris,


thanks again but it is not working. can it be a problem of networking. all of my computers are using a DHCP server and this server lies on windows. The database server also lies on widows but not the same server. All computers are assigned with Dynamic IP Addresses and they are recognised by the names not by the ip addresses shud i have to made some entries in the smb.conf or shud i have to made any change in my code..
 
Old 11-15-2002, 05:32 AM   #6
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Dynamic addresses are fine so long as you have a dynamiclly updating DNS or something similar.

Where does smb.conf come into this? Using Samba should be completely unconnected to this or have I missed something?

So long as you can resolve the correct IP address when you use the computer's name then your code should work. You can test this from the command line using ping, if this doesn't work then you either need to move to static addresses with a static name->ip address mapping (either hosts file or DNS) or make sure your DNS supports dynamic updating.

cheers

Jamie...
 
  


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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 08:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-08-2008 12:48 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM


All times are GMT -5. The time now is 09:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration