LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2004, 12:11 PM   #1
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Rep: Reputation: 15
JDBC mysql url parameter for tomcat's server.xml


This question is for those who know tomcat and mysql. I am using Red Hat 9, Tomcat 5.0.16 and mySql 3.5x. In server.xml, I entered a JDBC resource for a mysql database. I have (among others) parameters for url, user, and password. When I try to query the database via JDBC in a servlet, I get "Access denied for user: nobody@mymachine.mydomainname (Using password: YES). I am not using the nobody user. It seems that it is not picking up the user/password, I am not sure. Am I missing something?

Here is the relevant entries in server.xml:

<Resource name="jdbc/myDatabase"
type="javax.sql.DataSource"
auth="Container"
debug="6"
/>
<ResourceParams name="jdbc/myDatabase"/>
<paramater>
<name>user</name>
<value>someuser</value>
</parameter>
<parameter>
<name>password</name>
<value>somepassword</value>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>
jdbc:mysql://mymachine.mydomain/myDatabase
</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>9</value>
</parameter>
</ResourceParams>
 
Old 03-01-2004, 06:07 PM   #2
gschrade
Member
 
Registered: Oct 2003
Posts: 52

Original Poster
Rep: Reputation: 15
I found the answer to the problem: user needed to be changed to username.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
JDBC and MySQL Driver White R4bbit Debian 2 08-13-2004 05:55 PM
JDBC mysql url parameter for tomcat's server.xml gschrade Linux - Software 4 02-29-2004 01:23 PM
send an XML doc from perl to an URL... kdowney Programming 1 10-30-2003 09:30 AM
mysql and jdbc gballsch Programming 7 05-14-2003 05:04 PM
MySQL and JDBC oulevon Programming 1 07-16-2001 07:18 PM


All times are GMT -5. The time now is 08:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration