Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MySql Connection through socket file mysql.sock

 
Muhammad Ghufran
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have running MySql server on Linux it is confiured by tmp/mysql.sock for connecting client. I am unable to configure tomcat to connect MySql server thorought mysql.sock. The tomcat server is also running on same Linux box. I am able to connect Mysql via Mysql client utility. I am able to connect tomcat if MySql is configured for TCP/IP but I want to connect with filesystem. Following is my server.xml

<Context path="/navex" docBase="navex" debug="5" reloadable="true" crossContext="true">

<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_navex_log." suffix=".txt" timestamp="true"/>

<Resource name="jdbc/xxxxx" scope="Shareable" type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/xxxx">
<parameter>
<name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/xxxx?autoReconnect=true</value>
</parameter>
<parameter>
<name>username</name>
<value>xxxxx</value>
</parameter>
<parameter>
<name>password</name>
<value>xxxxx</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>
</Context>

Please Help me what should I use in url in order to connect with mysq.sock.

Thanks for any help in advance.

Ghufran
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic