You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Rizwan Ahmed <ri...@nscsa.com.sa> on 2002/03/30 12:25:44 UTC

error getting a database connection


Hello Group,

I am new to james, configured and understood most of the part but stuck with
connecting to mysql database after many tries.

mysql is running as a NT service. The log says error in getting the databse
connection. I am using a specific user profile to start mysql and use the
same user profile in config file.

Here is my config file,

<repository name="LocalUsers"
 
class="org.apache.james.userrepository.JamesUsersJdbcRepository"
                  destinationURL="db://maildb/users">
 
<sqlFile>file:///E:/james/apps/james/conf/sqlResources.xml</sqlFile>
</repository>

and data source definition,

<data-source name="maildb"
                     class="org.apache.james.util.mordred.JdbcDataSource">
            <driver>org.gjt.mm.mysql.Driver</driver>
            <dburl>jdbc:mysql://129.50.1.183/mail</dburl>
            <user>rizwan</user>
            <password>paswd</password>
</data-source>


I've created a database called mail in mysql and understand that tables will
be created automatically 

the error log,

"users-store" failed to pass through the Initialization stage. (Reason: An
exception occurred getting a database connection.).).

it's obvious that it is not connecting to mysql but I am clueless to what I
am missing...

thanks for any help,

rizwan    

RE: error getting a database connection

Posted by Danny Angus <da...@thought.co.uk>.
Looks like you are doing everything right from James point of view.. are you
sure your username & password work?
I've seen MySQL refuse a login becuse another one takes prefrence for the
host you are logging in from..


> -----Original Message-----
> From: Rizwan Ahmed [mailto:rizwan@nscsa.com.sa]
> Sent: 30 March 2002 11:26
> To: James Users List
> Subject: error getting a database connection
>
>
>
>
> Hello Group,
>
> I am new to james, configured and understood most of the part but
> stuck with
> connecting to mysql database after many tries.
>
> mysql is running as a NT service. The log says error in getting
> the databse
> connection. I am using a specific user profile to start mysql and use the
> same user profile in config file.
>
> Here is my config file,
>
> <repository name="LocalUsers"
>
> class="org.apache.james.userrepository.JamesUsersJdbcRepository"
>                   destinationURL="db://maildb/users">
>
> <sqlFile>file:///E:/james/apps/james/conf/sqlResources.xml</sqlFile>
> </repository>
>
> and data source definition,
>
> <data-source name="maildb"
>                      class="org.apache.james.util.mordred.JdbcDataSource">
>             <driver>org.gjt.mm.mysql.Driver</driver>
>             <dburl>jdbc:mysql://129.50.1.183/mail</dburl>
>             <user>rizwan</user>
>             <password>paswd</password>
> </data-source>
>
>
> I've created a database called mail in mysql and understand that
> tables will
> be created automatically
>
> the error log,
>
> "users-store" failed to pass through the Initialization stage. (Reason: An
> exception occurred getting a database connection.).).
>
> it's obvious that it is not connecting to mysql but I am clueless
> to what I
> am missing...
>
> thanks for any help,
>
> rizwan
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>