looks like your mysql user does not allow connections from the url of your tomcat. check whether access to mysql is granted to 'localhost' and (both entries!) '%'. the later should be used only for debugging however, better to include just the specific name of the tomcat hostname under named hosts in mysql.
afterwards don't forget to reload the user table in mysql and try again. HTH, jan marju jalloh <[EMAIL PROTECTED]> schrieb am 12.12.2005 12:22:30: > I can`connect to my database with via servlet. The connection > works well in PHP but not with servlet. I have googled but no solution. > > this is my error page I got > > java.sql.SQLException: Data source rejected establishment of > connection, message from server: "Host 'localhost.localdomain' is > not allowed to connect to this MySQL server" > at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650) > at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808) > at com.mysql.jdbc.Connection.<init>(Connection.java:452) > at com.mysql.jdbc.NonRegisteringDriver. > connect(NonRegisteringDriver.java:411) > at java.sql.DriverManager.getConnection(DriverManager.java:525) > at java.sql.DriverManager.getConnection(DriverManager.java:171) > at Liep.doGet(Liep.java:30) > ... > ... > Can anyone help or give me a pointer to a website > > Byfour > > > > --------------------------------- > Yahoo! Shopping > Find Great Deals on Holiday Gifts at Yahoo! Shopping --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]