• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java MySql connectivity using Linux sockets

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic