You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by David Wynter <da...@roamware.com> on 2002/11/06 15:42:57 UTC

Turbine failing to access MySQL database

I have a problem moving my working T2.1 application from a W2K box using
MySQL to a Linux box using MySQL. I get a   "java.sql.SQLException: Server
configuration denies access to data source"
message on the Linux box, but not on the W2K box. Seems simple enough, just
change the login id and password to one that operates on the database, oh it
already is. I checked the case of the id and password, I logged in using
same id and password with mysql, it works, just not through
Turbine/Tomcat/JDBC.

Is this something to do with the user who starts Tomcat, i.e. root, being
different to the user logging into the database?

Any ideas?

I have a separate simpler T2.1 webapp that runs on the same Linux box. I
notice that it gets the following error message when starting up:
java.lang.NoClassDefFoundError: org/apache/java/security/MessageDigest
when starting or shutting down the UniqueIdSevice service. Is this a missing
jar?

Thanks

David Wynter
Director
roamware Ltd.
(+44) (0) 208 922 7539 B.
(+44) (0) 7879 605 706 M.
david@roamware.com


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


RE: Turbine failing to access MySQL database - help?

Posted by David Wynter <da...@roamware.com>.
The only way to get MySQL on Mandrake or Red Hat with JDBC to work is to use
a

GRANT ALL PRIVILEGES on <database>.* to <username>@"%" identified by
'<password>'

With the appropriate substitutions, if you don't use the hostname wildcard
("%") the Linux distros expand the localhost to the full
localhost.localdomain which is rejected in th elogin. If you use the
combined <username>@<hostname> it is too long for MySQL to accept.

-----Original Message-----
From: David Wynter [mailto:david@roamware.com]
Sent: 06 November 2002 19:12
To: Turbine Users List
Subject: RE: Turbine failing to access MySQL database - help?


Hi,

I have more information now. There is a bug in Red Hat and Mandrake distro
where it uses localhost.localdomain instead of localhost for the host name.
So even though you use loacalhost as the host in your url string it uses the
longer version. This seems simple enough until you try to GRANT
PRIVILEGES... for localhost.localdomain and it won't let you because an
error occurs saying the host name is too long!.

I will keep plugging away at it.

David

-----Original Message-----
From: Chris K Chew [mailto:chris@fenetics.com]
Sent: 06 November 2002 18:28
To: Turbine Users List
Subject: RE: Turbine failing to access MySQL database - help?


Do the log files say anything?  The mysql documentation describes how to
configure logging, I don't remember it logging by default.

Chris



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


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


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


RE: Turbine failing to access MySQL database - help?

Posted by David Wynter <da...@roamware.com>.
Hi,

I have more information now. There is a bug in Red Hat and Mandrake distro
where it uses localhost.localdomain instead of localhost for the host name.
So even though you use loacalhost as the host in your url string it uses the
longer version. This seems simple enough until you try to GRANT
PRIVILEGES... for localhost.localdomain and it won't let you because an
error occurs saying the host name is too long!.

I will keep plugging away at it.

David

-----Original Message-----
From: Chris K Chew [mailto:chris@fenetics.com]
Sent: 06 November 2002 18:28
To: Turbine Users List
Subject: RE: Turbine failing to access MySQL database - help?


Do the log files say anything?  The mysql documentation describes how to
configure logging, I don't remember it logging by default.

Chris



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


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


RE: Turbine failing to access MySQL database - help?

Posted by Chris K Chew <ch...@fenetics.com>.
Do the log files say anything?  The mysql documentation describes how to
configure logging, I don't remember it logging by default.

Chris



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


RE: Turbine failing to access MySQL database - help?

Posted by David Wynter <da...@roamware.com>.
Hi,

I read through the archives, there is only really one on this subject. It
says that you have to setup a 'localhost' user in the user table in the
Mysql database. I already had one and am connecting with a
"database.default.url=mysql://localhost:3306/rwtransform" in my
TurbineResources.properties file

My mysql connect string looks like this "mysql -h localhost -u david -p" and
it works. Exactly the same hostname, user and password for both mysql and
jdbc. What else is there?????

David

-----Original Message-----
From: David Wynter [mailto:david@roamware.com]
Sent: 06 November 2002 14:43
To: Turbine-User
Subject: Turbine failing to access MySQL database


I have a problem moving my working T2.1 application from a W2K box using
MySQL to a Linux box using MySQL. I get a   "java.sql.SQLException: Server
configuration denies access to data source"
message on the Linux box, but not on the W2K box. Seems simple enough, just
change the login id and password to one that operates on the database, oh it
already is. I checked the case of the id and password, I logged in using
same id and password with mysql, it works, just not through
Turbine/Tomcat/JDBC.

Is this something to do with the user who starts Tomcat, i.e. root, being
different to the user logging into the database?

Any ideas?

I have a separate simpler T2.1 webapp that runs on the same Linux box. I
notice that it gets the following error message when starting up:
java.lang.NoClassDefFoundError: org/apache/java/security/MessageDigest
when starting or shutting down the UniqueIdSevice service. Is this a missing
jar?

Thanks

David Wynter
Director
roamware Ltd.
(+44) (0) 208 922 7539 B.
(+44) (0) 7879 605 706 M.
david@roamware.com


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


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