Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java MySql connectivity using Linux sockets

Mithun Madhu
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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://{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.
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!