Hi
It's *probably* due to Netscape thinking that "localhost" is the host the
browser is running on.
Try using "getCodeBase().getHost()" instead.
Nicholas
> I have an applet which is suppose to display data from a MySQL database
> to the web browser. This applet works fine with appletviewer but when I
> run it in a browser it gives an error;
>
> "Java.Sql.SQLException: cannot connect to mysql server on
> localhost:3306. Is there a mysql server running.............."
>
> I use the following class and connection string:
> String url = "jdbc:mysql://localhost/dbname";
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
>
> I load the MySQL server by C:\mysql\bin\mysqld.
>
> Any help would be appreciated.
>
> Thank you
>
> Abjin
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
===========================================================================
Nicholas Wright Imperial Software Technology Software Engineer
---------------------------------------------------------------------------
Email : [EMAIL PROTECTED] or [EMAIL PROTECTED]
Berkshire House 120 Hawthorne Ave, #101
252 Kings Road Palo Alto
Reading RG1 4HP United Kingdom California 94301 USA
Tel: +44 118 958 7055 Tel: 650 688 0200
FAX: +44 118 958 9005 FAX: 650 688 1054
===========================================================================
****** VISAJ AT http://www.ist.co.uk/visaj ******
===========================================================================
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]