[opencms-dev] Re: [opencms-dev] I believe I´m quite close :-)

Andy Bailey abailey at cic-net.com
Thu Apr 6 10:41:09 CEST 2000


----- Original Message -----
From: "kwaH" <kwah at gmx.net>
To: <opencms-dev at www.opencms.com>
Sent: Thursday, April 06, 2000 1:12 AM
Subject: [opencms-dev] I believe I´m quite close :-)


> Hi,
>
> after some sleepless nights I got most of the OpenCMS
> stuff installed and initialized (thanks for all the hints
> concerning the xerces 1.0.1 stuff).
>
> There is just one annoyance in my opencms.log preventing me
> from starting up the whole thing (I hope it´s the last annoyance):
>
> [06.04.2000 02:51:40] <opencms_init> [OpenCms]
> [CmsAccessUserMySql]:General error: Access denied for user: '@localhost'
> to database 'opencms'
>
> *Sigh*
>
> What does _that_ mean ?
>
> I grepped all my config files for references to localhost but didn´t
> find anything that looks like a login to the mysql server. I even tried
> to add a user with full access with the name "@localhost" - still no
> result.
>
Hi Kwah,

This happens because the url for the mySQL Database contains the username
and password.
In fact this is not the way to reliably open a connection to any DB via
JDBC.

What I did to get the thing running was to grep all the java files for
getConnection
and edit the files replacing getConnection(url) with getConnection(url,
"root", "");
Then edit the opencms.properties file in the servlets dir and remove the
?user=root&password= from the URL.

It then works.

Andy Bailey

PS to make this a general fix for opencms you will need to patch the code
where the
opencsm properties are read in and add appropriate property lines for
username and password
+ suitable vars (or even a Properties object) for them.

Hope this helps

Andy Bailey




More information about the opencms-dev mailing list