3 Replies Latest reply on May 12, 2002 3:22 PM by dviersel

    Username Problem with JBoss 3 and mySQL

    thl-mot

      I have a strange problem:
      All connections to the database are done with an empty username (I tried the same with SQLServer there it is "sa").
      I attached my mysql-servixe.xml where I specified the user.

      I also tried to specify the user in the source code:
      Connection con = dataSource.getConnection( "thomas", "secret")

      Neither of these things worked. What is wrong.


        • 1. Re: Username Problem with JBoss 3 and mySQL
          davidjencks

          Specify username in PrincipalMappingProperties

          • 2. Re: Username Problem with JBoss 3 and mySQL
            axelm

            I have exactly the same problem, that username and password are not picked up from the mysql-service.xml. I end up having to start mysql with grant tables off ( bad...) to connect.
            On the other side I'm able to connect from a servlet using jdbc to mysql with the username-password combo ( and grant tables turned on.)

            Thanks.


            • 3. Re: Username Problem with JBoss 3 and mySQL
              dviersel

              I have a un/pw combo specified in the login-config.xml. It works without problems. I am using JBoss 3.0 RC2.

              However, I have another problem: I have specified an additional datasource within the same security domain i.e. in the mysql service I have two definitions of Datasources pointing to two different tables. When I try to deploy a bean, the second un/pw combo in login-config.xml is not picked up.