LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to connect to the mysql (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-connect-to-the-mysql-35510/)

puru_09 11-15-2002 02:19 AM

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

jharris 11-15-2002 02:37 AM

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...

puru_09 11-15-2002 03:23 AM

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

jharris 11-15-2002 03:28 AM

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...

puru_09 11-15-2002 04:20 AM

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..

jharris 11-15-2002 04:32 AM

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...


All times are GMT -5. The time now is 08:45 AM.