3 Replies Latest reply on Apr 28, 2005 3:19 PM by plutus

    Access MySQL as user root

      Hi,

      I write an MBean DatabaseStatus that I'd like to manage with my JMX client. I wrote the following method:

      public List showSlaveStatus(String rootPassword) throws BusinessException;

      and I would like to make a mysql-connection to my DB as user root.

      What are the steps I have to follow? I suppose it isn't very secure to define a datasource with user root and password in the deploy dir...?

      <local-tx-datasource>
      <jndi-name>MySqlDS</jndi-name>
      <connection-url>...</connection-url>
      <driver-class>org.gjt.mm.mysql.Driver</driver-class>
      <user-name>root</user-name>
      rootPassword
      </local-tx-datasource>

      But what is a better solution?