Cannot connect to mysql from tomcat
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Paul_Hunnisett
Posted On:   Friday, June 21, 2002 05:43 AM

I am trying to connect to mysql from tomcat using a datasource object. I have everything set up in server.xml where I am trying to connect as root without a password (this is how I have set things ups in mysql). If I use my hostname in the url instead of localhost then everything seems to work until I actually try to connect from within the we application. If I use localhost (which I would prefer) then tomcat throws errors when it starts. Either way the error is "Server configuration denies access to data source" If I use "mysql -u root mydbname" then everything works fine and I can perform queries etc... I am running al lthis on Linux, I did try it on windows, but had similar problems and I'd rather work on    More>>

I am trying to connect to mysql from tomcat using a datasource object. I have everything set up in server.xml where I am trying to connect as root without a password (this is how I have set things ups in mysql). If I use my hostname in the url instead of localhost then everything seems to work until I actually try to connect from within the we application. If I use localhost (which I would prefer) then tomcat throws errors when it starts. Either way the error is "Server configuration denies access to data source"

If I use "mysql -u root mydbname" then everything works fine and I can perform queries etc...

I am running al lthis on Linux, I did try it on windows, but had similar problems and I'd rather work on Linux anyway

   <<Less

Re: Cannot connect to mysql from tomcat

Posted By:   Lester_Balmaceda  
Posted On:   Monday, June 24, 2002 04:33 PM

When you make a connection with mm.mysql jdbc driver without specifying username by default uses "nobody"....

when you connect from a command line (windows or linux) the default user is the os user that is logged.

I recommend you use a explicit username (with o without pwd).
About | Sitemap | Contact