5 messages in com.mysql.lists.javaRe: Connection to a database using a ...
FromSent OnAttachments
Johnny24 Sep 2004 05:15 
Rikard Froberg24 Sep 2004 06:51 
Johnny24 Sep 2004 07:41 
Mark Matthews24 Sep 2004 08:09 
Johnny24 Sep 2004 11:34 
Subject:Re: Connection to a database using a mysql.sock file.
From:Johnny (joh@escriba.com.br)
Date:09/24/2004 11:34:09 AM
List:com.mysql.lists.java

Can you give me an example? The method must return the result of a select for example. Thanks.

Mark Matthews wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Johnny wrote:

I'm needing the parameters to connect to a mysql database using a mysql.sock file. The database is on the localhost, so the problem is only to open the file, usin the string of connection. Anyone have an ideia? Thanks

You can't do it with the stock JDBC driver. Java doesn't support unix domain sockets.

Connector/J _does_ support pluggable socket factories, so with something like this:

http://www.nfrese.net/software/gnu_net_local/overview.html

You could put one together in rather short order by just copying the implementation in StandardSocketFactory, and plugging in Norton's work.

-Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com

MySQL Guide to Lower TCO http://www.mysql.com/it-resources/white-papers/tco.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBVDiutvXNTca6JD8RArfbAJ9GV0rFdDnJWVOH+KkYdMo49nw1fACfbo06 Tst5qXwlg+A6N8vpYD7qFF8= =hvb1 -----END PGP SIGNATURE-----