2 Replies Latest reply on Nov 5, 2008 5:04 PM by peterj

    How start mysql via mysqld-service using named pipes

    lpmon

      I can start MySQL outside of JBoss with named pipes enabled and then configure a datasource to connect to it. If I launch MySQL via jmx (mysqld-service.xml) I see it running but when the datasource using it tries to connect it cannot. I see this in the log:

      Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure

      Last packet sent to the server was 0 ms ago.
      at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
      at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2104)
      at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:729)
      at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
      ... 122 more
      Caused by: java.io.FileNotFoundException: \\.\pipe\MySQL (The system cannot find the file specified)
      at java.io.RandomAccessFile.open(Native Method)
      at java.io.RandomAccessFile.(RandomAccessFile.java:212)
      at java.io.RandomAccessFile.(RandomAccessFile.java:98)
      at com.mysql.jdbc.NamedPipeSocketFactory$NamedPipeSocket.(NamedPipeSocketFactory.java:57)
      at com.mysql.jdbc.NamedPipeSocketFactory.connect(NamedPipeSocketFactory.java:215)
      at com.mysql.jdbc.MysqlIO.(MysqlIO.java:276)
      at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2027)
      ... 126 more

      There is a propery called namedPipePath. If I use that in the mysql startup (mysqld-service.xml) it will not start and says that is not a valid attribute. Error is: No Attribute found with name: namedPipePath

      My knowledge of named pipes is minimal. Does the connector/datasource need to know named pipe path in use? How do I find that? Or what?

      I must be missing some key configuration step. Help!

      Example configuration files would be great.

      From mysqld-service.xml


      ..\server\default\data\mysql\data
      ..\server\default\data\mysql
      true
      true

      from mysql-ds.xml

      <connection-url>jdbc:mysql://./mytestdb</connection-url>
      <connection-property name="socketFactory">com.mysql.jdbc.NamedPipeSocketFactory</connection-property>
      <!-- commented out now, tried earlier connection-property name="namedPipePath">c:\pipe\MySQL</connection-property-->