Re: db connection denied access
At 11:49 AM 8/15/2001, you wrote: >If you're going to be using MySQL, do yourself a favor and buy this book: > >http://www.amazon.com/exec/obidos/ASIN/0735709211/qid=997901246/sr=2-2/107-4 >535935-5049369 Or, do yourself a bigger favor and use Postgres.
Re: db connection denied access
You need to read chapters 4.2 and 4.3 of the MySQL manual: http://www.mysql.com/doc/P/r/Privilege_system.html http://www.mysql.com/doc/U/s/User_Account_Management.html MySQL has a somewhat strange privilege system for granting access to the database. But it's very flexible, once you learn it. If you're going to be using MySQL, do yourself a favor and buy this book: http://www.amazon.com/exec/obidos/ASIN/0735709211/qid=997901246/sr=2-2/107-4 535935-5049369 It's invaluable. --jeff - Original Message - From: "Richard Draucker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 15, 2001 8:04 AM Subject: db connection denied access > This is odd and I'm stumped. I have a simple db connection class in a jar > under ~app/WEB-INF/lib. I have a servlet under ~app/WEB-INF/classes that > imports this connection class. The mm.mysql driver jar also resides in this > WEB-INF/lib. > The servlet accesses the connection class just fine. But, when the > connection class attempts a connection to the database I get the error: > > java.sql.SQLException: Server configuration denies access to data source > > However, if I cut 'n paste the code from the connection class into the > servlet I have no problem with the connection or data retrieval. > > FYI: > RH7.1 new installation > jdk 1.3.1 > Tomcat 3.2.1 > MySQL 3.2.2 > > > -- > Richard Draucker [EMAIL PROTECTED] > Protected-Data.Com www.protected-data.com > Remote Data Support For Web Developers >
Re: db connection denied access
Thanks, I found the problem. Probably shoulda posted this on the MySQL group, sorry. Using the host ip in the connection url for the db generates the error. Using 'localhost' or any host name that the database considers valid works just fine. - Richard On Wednesday 15 August 2001 11:04 am, you wrote: > This is odd and I'm stumped. I have a simple db connection class in a jar > under ~app/WEB-INF/lib. I have a servlet under ~app/WEB-INF/classes that > imports this connection class. The mm.mysql driver jar also resides in > this WEB-INF/lib. > The servlet accesses the connection class just fine. But, when the > connection class attempts a connection to the database I get the error: > > java.sql.SQLException: Server configuration denies access to data source > > However, if I cut 'n paste the code from the connection class into the > servlet I have no problem with the connection or data retrieval. > > FYI: > RH7.1 new installation > jdk 1.3.1 > Tomcat 3.2.1 > MySQL 3.2.2 -- Richard Draucker [EMAIL PROTECTED] Protected-Data.Com www.protected-data.com Remote Data Support For Web Developers
Re: db connection denied access
> java.sql.SQLException: Server configuration denies access to data source -> It's a SQLException, so it looks like you've established a pipe between your code and the server (that error message would imply its Tomcat's fault), but in a way the *database* server doesn't like. I'm not sure why MySQL would deny you access... - r
db connection denied access
This is odd and I'm stumped. I have a simple db connection class in a jar under ~app/WEB-INF/lib. I have a servlet under ~app/WEB-INF/classes that imports this connection class. The mm.mysql driver jar also resides in this WEB-INF/lib. The servlet accesses the connection class just fine. But, when the connection class attempts a connection to the database I get the error: java.sql.SQLException: Server configuration denies access to data source However, if I cut 'n paste the code from the connection class into the servlet I have no problem with the connection or data retrieval. FYI: RH7.1 new installation jdk 1.3.1 Tomcat 3.2.1 MySQL 3.2.2 -- Richard Draucker [EMAIL PROTECTED] Protected-Data.Com www.protected-data.com Remote Data Support For Web Developers