You should check to see that the MySQL daemon and or service
is running to be listening on that port. For NT; open
up the services tool and view it.
--- Chetna Bhatt <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have installed mySQL on Windows NT and also am using Java Web
> Server2.0 to execute the JSP file.Now im trying to connect to the
> database in mySQL ...but it is giving me an error as follows:
>
> java.sql.SQLException: Cannot connect to MySQL server on zeus:3360. Is
> there a MySQL server running on the machine/port you are trying to
> connect to? (java.security.AccessControlException)
>
>
> and my JSP file is as follows:
> <html>
> <head><title>Company Details</title></head>
> <%@ page language="java" import="java.sql.*" %>
> <body>
> <h1>Company Details</h1>
> <table border=1 width=400 align="center">
> <tr>
> <td><b>Id</b></td>
> <td><b>Company's Name</b></td>
> </tr>
> <%
> Connection conusers = null;
> ResultSet rsusers = null;
> Statement stusers = null;
> String dataid,datacname;
>
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> conusers =
>
DriverManager.getConnection("jdbc:mysql://zeus:3360/zeus?user=admin;password=admin");
>
> stusers = conusers.createStatement();
> rsusers = stusers.executeQuery("SELECT id,name FROM emp");
>
> while(rsusers.next())
> {
> dataid = rsusers.getString("id");
> datacname = rsusers.getString("name");
> %>
>
> <tr>
> <td><%= dataid %></td>
> <td><%= datacname %></td>
> </tr>
>
> <%
> }
> stusers.close();
> conusers.close();
> %>
>
> </table>
> </body>
> </html>
>
>
>
> I have also downloaded the mm.mysql driver from the worldserver site and
>
> also set the CLASSPATH in the System-Environment (NT) as:
> .;E:\mm.mysql.jdbc-1.2c;%CLASSPATH%
>
> HAm i going worng somewhere or do i need to install some other driver as
>
> well...or is mySQL Server not loaded properly...or how do i check that
> mySQL server is running and listeneing to port no 3306.
>
> Please help me out.
> THANX in advance.
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
__________________________________________________
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one Place.
http://shopping.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets