aspose file tools*
The moose likes JDBC and the fly likes Java MySql connectivity using Linux sockets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java MySql connectivity using Linux sockets" Watch "Java MySql connectivity using Linux sockets" New topic
Author

Java MySql connectivity using Linux sockets

Mithun Madhu
Greenhorn

Joined: Feb 26, 2009
Posts: 8
Hi,
I had connected my web application developed in Java to MySql using a JDBC driver (mysql-connector-java.jar). It works fine when I connect through TCP/IP using connection string 'jdbc:mysql://127.0.0.1:3306/{database}'.
I tried to connect it through socket after adding 'skip-networking' , 'enable-socket' and 'socket = /var/lib/mysql/mysql.sock' in my.cnf.
When I open MySql through the terminal (mysql -u root -p) it works but my application is unable to connect to MySql using sockets.
Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java MySql connectivity using Linux sockets