p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   JSP Basics (http://p2p.wrox.com/forumdisplay.php?f=92)
-   -   Other things to try (http://p2p.wrox.com/showthread.php?t=3342)

Martyn August 29th, 2003 09:44 AM

Other things to try
 
I've been thing about your problem and here a few other thoings to try:

When you log into the database form the console the hostname is 127.0.0.1 and when Tomcat logs into the database it uses the host localhost. Make sure that you have both hostnames listed in the user-table (I know people have solved this solved this by setting the host-name to '%'). You could also try to use the URL jdbc:mysql://127.0.0.1/etc.

GRANT ALL ON dbname.* TO "username"@hostname IDENTIFIED BY "password"

Confirm that you have the correct password in the connection string. Also, check the spelling and the case. Use something like this:

getConnection( "jdbc:mysql://localhost/mydbname", "myusername", "mypassword" );


Good luck....

Martyn


All times are GMT -4. The time now is 11:45 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.