This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
 
It's not a secret anymore!