You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ku...@inwind.it on 2003/04/06 16:43:04 UTC

using a MySQL remote database

Hello,

I would like to use a remote MySQL database. I already used that with ORION
with no problem, but with Tomcat i cant. I added the mmsql.jar file into
shared/lib but accessing the database (using
 DriverManager.getConnection ("jdbc:mysql://host.host/databasename",
username, password); ), i get always the error:

SQLEXCEPTION = No suitable driver
SQLSTATE = 08001

Any help?

luca


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: using a MySQL remote database

Posted by ku...@inwind.it.
Hello,
the error was simply that i wasnt calling the newInstance() on Class.forName
(mysql_class_driver),
i added that and now it is working.
Sorry for my silly error :)
Anyway many thanks, Tomcat is nicely supported by you all!

Greetings,
groton

-----Messaggio Originale-----
Da: "Jon Wingfield" <jo...@mkodo.com>
A: "Tomcat Users List" <to...@jakarta.apache.org>
Data invio: martedì 8 aprile 2003 12.05
Oggetto: Re: using a MySQL remote database


> And you're specifying a port?
>
> this connection string works for me:
> jdbc:mysql://remote.server:3306/dbname
>
> Of course the mysql user must have permission to access the database
> from your app server box. Check the user permissions defined in the
> mysql database of your mysql instance.
>
>
http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Adm
inistration.html#Connection_access
>
> HTH,
>
> Jon
>
> kurtc@inwind.it wrote:
> > Ok, i followed both the tips by Greg and this one in the email at the
bottom
> > of this email ( :) ),
> > but with no success.
> > I did exactly what the README (containbed in the MySQL connector
archive)
> > explains:
> >
> > snip from the README file:
> > ================================
> >   Issue:
> >   "My application throws a SQLException 'No Suitable Driver'".
> >   Resolution:
> >   One of two things are happening. Either the driver is not in
> >   your CLASSPATH (see the "USAGE AND INSTALLATION" section above), or
your
> >   URL format is incoorect (once again see "USAGE AND INSTALLATION").
> > ================================
> >
> > Eh, that error above is the error i got!
> > Although I installed correctly the connector for MySQL in TomCat, im
still
> > getting the errors above. Reading again the USAGE AND INSTALLATION will
not
> > help me.
> >
> > Finally I tryed to copy the jar containing the MySQL connector every
where
> > in the "lib"s dirs, i also had extracted the class files contained in
that
> > .jar in all the "classes" dirs, and still getting those error :|
> >
> > Any help? Or Any other way to connect to a MySQL server? Notice that
using
> > others servlet containers like Orion it works perfectly :o
> > luca
> >
> > Da: "dwightHugget" <ja...@concentric.net>
> > A: "Tomcat Users List" <to...@jakarta.apache.org>;
<ku...@inwind.it>
> > Data invio: domenica 6 aprile 2003 23.15
> > Oggetto: Re: using a MySQL remote database
> >
> >
> > On Sunday 06 April 2003 10:43, kurtc@inwind.it professed:
> >
> >>Hello,
> >>
> >>I would like to use a remote MySQL database. I already used that with
> >
> > ORION
> >
> >>with no problem, but with Tomcat i cant. I added the mmsql.jar file into
> >>shared/lib but accessing the database (using
> >> DriverManager.getConnection ("jdbc:mysql://host.host/databasename",
> >>username, password); ), i get always the error:
> >>
> >>SQLEXCEPTION = No suitable driver
> >>SQLSTATE = 08001
> >>
> >>Any help?
> >>
> >>luca
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: using a MySQL remote database

Posted by Jon Wingfield <jo...@mkodo.com>.
And you're specifying a port?

this connection string works for me:
jdbc:mysql://remote.server:3306/dbname

Of course the mysql user must have permission to access the database 
from your app server box. Check the user permissions defined in the 
mysql database of your mysql instance.

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Connection_access

HTH,

Jon

kurtc@inwind.it wrote:
> Ok, i followed both the tips by Greg and this one in the email at the bottom
> of this email ( :) ),
> but with no success.
> I did exactly what the README (containbed in the MySQL connector archive)
> explains:
> 
> snip from the README file:
> ================================
>   Issue:
>   "My application throws a SQLException 'No Suitable Driver'".
>   Resolution:
>   One of two things are happening. Either the driver is not in
>   your CLASSPATH (see the "USAGE AND INSTALLATION" section above), or your
>   URL format is incoorect (once again see "USAGE AND INSTALLATION").
> ================================
> 
> Eh, that error above is the error i got!
> Although I installed correctly the connector for MySQL in TomCat, im still
> getting the errors above. Reading again the USAGE AND INSTALLATION will not
> help me.
> 
> Finally I tryed to copy the jar containing the MySQL connector every where
> in the "lib"s dirs, i also had extracted the class files contained in that
> .jar in all the "classes" dirs, and still getting those error :|
> 
> Any help? Or Any other way to connect to a MySQL server? Notice that using
> others servlet containers like Orion it works perfectly :o
> luca
> 
> Da: "dwightHugget" <ja...@concentric.net>
> A: "Tomcat Users List" <to...@jakarta.apache.org>; <ku...@inwind.it>
> Data invio: domenica 6 aprile 2003 23.15
> Oggetto: Re: using a MySQL remote database
> 
> 
> On Sunday 06 April 2003 10:43, kurtc@inwind.it professed:
> 
>>Hello,
>>
>>I would like to use a remote MySQL database. I already used that with
> 
> ORION
> 
>>with no problem, but with Tomcat i cant. I added the mmsql.jar file into
>>shared/lib but accessing the database (using
>> DriverManager.getConnection ("jdbc:mysql://host.host/databasename",
>>username, password); ), i get always the error:
>>
>>SQLEXCEPTION = No suitable driver
>>SQLSTATE = 08001
>>
>>Any help?
>>
>>luca
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: using a MySQL remote database

Posted by ku...@inwind.it.
Ok, i followed both the tips by Greg and this one in the email at the bottom
of this email ( :) ),
but with no success.
I did exactly what the README (containbed in the MySQL connector archive)
explains:

snip from the README file:
================================
  Issue:
  "My application throws a SQLException 'No Suitable Driver'".
  Resolution:
  One of two things are happening. Either the driver is not in
  your CLASSPATH (see the "USAGE AND INSTALLATION" section above), or your
  URL format is incoorect (once again see "USAGE AND INSTALLATION").
================================

Eh, that error above is the error i got!
Although I installed correctly the connector for MySQL in TomCat, im still
getting the errors above. Reading again the USAGE AND INSTALLATION will not
help me.

Finally I tryed to copy the jar containing the MySQL connector every where
in the "lib"s dirs, i also had extracted the class files contained in that
.jar in all the "classes" dirs, and still getting those error :|

Any help? Or Any other way to connect to a MySQL server? Notice that using
others servlet containers like Orion it works perfectly :o
luca

Da: "dwightHugget" <ja...@concentric.net>
A: "Tomcat Users List" <to...@jakarta.apache.org>; <ku...@inwind.it>
Data invio: domenica 6 aprile 2003 23.15
Oggetto: Re: using a MySQL remote database


On Sunday 06 April 2003 10:43, kurtc@inwind.it professed:
> Hello,
>
> I would like to use a remote MySQL database. I already used that with
ORION
> with no problem, but with Tomcat i cant. I added the mmsql.jar file into
> shared/lib but accessing the database (using
>  DriverManager.getConnection ("jdbc:mysql://host.host/databasename",
> username, password); ), i get always the error:
>
> SQLEXCEPTION = No suitable driver
> SQLSTATE = 08001
>
> Any help?
>
> luca
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


http://www.mysql.com/downloads/api-jdbc-stable.html
--
Dwight Hugget
http://www.dmhEnterprise.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: using a MySQL remote database

Posted by dwightHugget <ja...@concentric.net>.
On Sunday 06 April 2003 10:43, kurtc@inwind.it professed:
> Hello,
>
> I would like to use a remote MySQL database. I already used that with ORION
> with no problem, but with Tomcat i cant. I added the mmsql.jar file into
> shared/lib but accessing the database (using
>  DriverManager.getConnection ("jdbc:mysql://host.host/databasename",
> username, password); ), i get always the error:
>
> SQLEXCEPTION = No suitable driver
> SQLSTATE = 08001
>
> Any help?
>
> luca
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


http://www.mysql.com/downloads/api-jdbc-stable.html
-- 
Dwight Hugget
http://www.dmhEnterprise.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache Redirect to Tomcat

Posted by John Turner <to...@johnturner.com>.
Most likely you do not have a correct virtual host in server.xml.  Just as 
you must define a virtual host with a name of mydomain.com in Apache's 
httpd.conf, so must you define one in server.xml.

John

On Sun, 6 Apr 2003 20:49:15 -0400, RK Paleru <rp...@uncc.edu> wrote:

> Hi,
>
> My Apache is connected to Tomcat using Mod_JK. The redirect from Tomcat
> works fine when I access from local machine i.e.,
> http://localhost/my_webapp/my_servlet
>
> however, when I try from the internet.....
>
> http://mydomain.com/my_webapp/my_servlet does not work.
>
> The static content gets served fine by Apache....any help will be
> appreciated.
>
> regards
>
> RK
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Apache Redirect to Tomcat

Posted by RK Paleru <rp...@uncc.edu>.
Hi,

My Apache is connected to Tomcat using Mod_JK. The redirect from Tomcat
works fine when I access from local machine i.e.,
http://localhost/my_webapp/my_servlet

however, when I try from the internet.....

http://mydomain.com/my_webapp/my_servlet does not work.

The static content gets served fine by Apache....any help will be
appreciated.

regards

RK


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: using a MySQL remote database

Posted by Greg Speechley <gr...@learnedsolutions.com>.
Quote from
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html

NOTE: Do not install these jarfiles in your /WEB-INF/lib, or
$JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems if
you install them anyplace other than $CATALINA_HOME/common/lib.

Hope that helps

Greg

> -----Original Message-----
> From: kurtc@inwind.it [mailto:kurtc@inwind.it]
> Sent: Monday, 7 April 2003 12:13 AM
> To: Tomcat Users List
> Subject: using a MySQL remote database
>
>
> Hello,
>
> I would like to use a remote MySQL database. I already used that
> with ORION
> with no problem, but with Tomcat i cant. I added the mmsql.jar file into
> shared/lib but accessing the database (using
>  DriverManager.getConnection ("jdbc:mysql://host.host/databasename",
> username, password); ), i get always the error:
>
> SQLEXCEPTION = No suitable driver
> SQLSTATE = 08001
>
> Any help?
>
> luca
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org