JSP Mysql Connection Problem

Hi Friend,
I am facing some problem in connecting mysql with jsp .
When I try and connect to mysql with the following connection string
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/testdhiraj?user=root&password=dh");
Statement statement     = con.createStatement();
I get an error :
java.sql.SQLException: Communication link failure: Bad handshake
I don't know what is wrong,
as I had tested mysql using telnet and it connects and executes sql nicely.
Waiting for ur reply,
Dhiraj Agrawal
mail to : [email protected]

Hi,
You need to make sure that , you have given correct database name, user id and password in the connection url. and also check the jdbc driver is loaded properly. If your mysql is running in the standard port, you need not give the port as 3306.
Here is the example :
import java.sql.*;
     Notice, do not import org.gjt.mm.mysql.*
or you will have problems!
public class XampleClass
public static void main(String[] Args)
try {      
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
catch (Exception e) {
System.err.println("exception while loading
driver.");
e.printStackTrace();
try {
Connection C = DriverManager.getConnection(
"jdbc:mysql://localhost/test?user=myuser&password=mypwddb");
// Do something with the Connection
catch (SQLException e) {
System.out.println("Exception: " + e);
This is the format for conenction url :
jdbc:mysql://[hostname][:port]/dbname[?param1=value1][&param2=value2]...
Hope this helps you.
Thanks,
Senthil_Slash

Similar Messages

  • PHP and MySQL Connection problem

    I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
    When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
    "Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
    I know the user, password, etc. work, as I can access the MySQL database with other software.
    I checked with my host and they say there are no permission problems on their end.
    I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
    I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
    Any help would be appreciated.

    I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
    Is there some other testing server that I should be aware of?
    Frank
    Date: Wed, 3 Jun 2009 15:43:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP and MySQL Connection problem
    I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
    >

  • DW CS3 to MySql connection problem

    I have DW CS3 on Windows Vista. I have installed the Apache
    web server and MySql. I've associated the Apache server for testing
    and it works fine for page displays, so when I make a change to a
    page and hit F12 it is uploaded to the test environment and
    displayed in a browser.
    MySql is up and running, I can log onto it with the MySql
    admin client and see my database (just a testing one).
    When I try to test the sql connection I get the message "An
    unidentified error has occurred" and I don't have access to the
    data.
    When I try to test a PHP page it is treated as a file object
    and not processed, just loaded for editing.
    I don't know what I've set up wrong, any help
    appreciated.

    Was this issue resolved?
    I have the same problem now. DW was working fine the one day and the next when I started it it had this connection problem.
    I am testing on my local PC. My sites is at http://localhost/
    All my connection are working because if I go to http://localhost/index.php I can see my site and if I go to http://localhost/register.php I can even register a new user. It will include the new user details in the data base and everything is working fine. So there is nothing wrong with the connection.
    In DW I do have http://localhost/ on the Local Info screen. As I said, all was working fine on the current setup the one day and the next day it did not want to work.
    Seems like a very common problem.
    I want to buy CS4 and surely hope that the problem has been fixed by now.

  • MySQL connectivity Problem URGENT plz

    Hi
    plz can any one help me... its urgent
    i need java to connect to MySQL database.with mm.mysql.Driver
    the following sample code is just copied from the site and made changes in hostname, dbname and username.
    classpath has been given correctly for the mm.mysql.Driver package (mysql.jar).
    Thanx in advance....
    Result
    compilation --> success
    while executing i get the following Error.
    java.sql.SQLException: General Error: null
         at org.git.mm.mysql.connection.<init>(Connection.java)
         at org.git.mm.mysql.Driver.connect(Driver.java)
         at java.sql.DriverManager.getConnection(DriverManager.java: 515)
         at java.sql.DriverManager.getConnection(DriverManager.java: 197)
         at JDBCDemoCreate.getConnection(JDBCDemoCreate.java: 36)
         at JDBCDemoCreate.<init>(JDBCDemoCreate.java: 14)
    java.lang.NullPointerException
         at JDBCDemoCreate.<init>(JDBCDemoCreate.java: 17)
         at JDBCDemoCreate.main(JDBCDemoCreate.java: 47)
    Here is the code. can any one try this !
    // JDBCDemoCreate.java
    1.     import java.util.*;
    2.     import java.sql.*;
    3.
    4.     public class JDBCDemoCreate {
    5.
    6.     private static final String hostname = "hostname";
    7.     private static final String port = "3306";
    8.     private static final String database = "dbname";
    9.     private static final String username = "username";
    10.     private static final String password = "";
    11.
    12.     public JDBCDemoCreate() {
    13.
    14.          Connection c = getConnection();
    15.
    16.          try {
    17.               Statement s = (Statement)c.createStatement();
    18.               s.executeUpdate("CREATE TABLE rich ( id int primary key, name char(25) )");
    19.          } catch ( Exception e ) {
    20.               e.printStackTrace();
    21.          }
    22.
    23.     }
    24.
    25.     private Connection getConnection() {
    26          // Register the driver using Class.forName()
    27.          try {
    28.               Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    29.          } catch ( Exception e ) {
    30.               e.printStackTrace();
    31.          }
    32.
    33.          // ask the DriverManager for a connection to the database
    34.          Connection conn = null;
    35.          try {
    36.               conn = DriverManager.getConnection("jdbc:mysql://" + hostname +
    37.                                                                      ":"+ port +"/" + database +
    38.                                                                      "?user=" + username +
    39.                                                                      "&password=" + password );
    40.          } catch (Exception e) {
    41.               e.printStackTrace();
    42.          }
    43.          return conn;
    44.     }
    45.     
    46.     public static void main( String[] args ) {
    47.          new JDBCDemoCreate();
    48.     }
    49.}

    Hi!
    You can try with this code coz, i worked with this code only and then i can talk to the database.
    Connection con;
    Class.forName("org.gjt.mm.mysql.Driver";
    con = DriverManager.getConnection("jdbc:mysql:///db?user=root&password=");
    Try it out!
    Queries regarding this is welcome. Either in this forum itself or u can contact in the mail, the id is
    [email protected]
    Regards,
    dinesh

  • MySQL Connectivity problem

    Hi all,
    I am new to JSP. I am using Eclipse 3.2. with all lpugins. The following code throws an error. Pleas help me.
    <html><body>
    <%@ page import="java.sql.*, java.lang.ClassNotFoundException"%>
    <%
         String connectionURL = "jdbc:mysql://localhost:3306/online_hotel_booking";
         String userName = "root";
         String password = "root";
         // Load the driver class and establish a connection
         try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              Connection con = DriverManager.getConnection(connectionURL,userName,password);
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("select * from hotel_details");
              while (rs.next()) {
                   out.println(rs.getString(1));
                   out.println(rs.getDate(2));
              /* closing the connection */
              rs.close();
              stmt.close();
              con.close();
         catch (Exception e) {
              out.println("Exception!"+e);
    %>
    </body></html>It throws ClassNot FoundException: com.mysql.jdbc.Driver
    Thanks in advance

    JDBC questions should be posted in the JDBC forum: http://forum.java.sun.com/forum.jspa?forumID=48
    If you take the time to look the active topic listing of the JDBC forum, you'll see that you're not the only one who encountered the problem. Yesterday I answered similar topic on this issue.

  • JDBC/MYSQL Connection problems

    I'm new to using JDBC so I'm not sure if I'm simply doing something wrong in my code or if I've installed something incorrectly. I've got the JDBC connector/J installed properly as far as I can tell. At least when I run my code I'm not getting an error about the driver not being found. The problem I'm running into is that even though I've double and triple checked the authentication info I keep getting the following error:
    Exception in thread "main" java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user: '[email protected]' (Using password: YES)"
    The actual connection commands I'm using are as follows:
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Test", "testusr", "testpwd");
    I've checked and rechecked the spelling of my mySQL user & password and as far as I can tell, they work just fine so I can't figure out why I would be getting this error. Any suggestions on things I can try or does anyone see any obvious errors in what I'm doing?

    The failure is caused not by the JDBC driver but by how the MySQL was configured
    when it was installed. By default, MySQL is configured to allow connections that
    are created only from within the localhost.
    The line
    DriverManager.getConnection("jdbc:mysql://localhost:3306/Test?user=testusr& password=testpwd") translates to "create a connection to MySQL running at 'localhost' and use the
    'testusr@<hostname.domain>' as user name and 'testpwd' as the password".
    If you can see, the <hostname.domain> is replaced with "other value" aside from
    the "localhost" which you expect, hence connection is denied.
    The '<hostname.domain>' is replaced with the value of either your IP address or
    hostname. Therefore, any connections created from outside the host where your
    server is running will be denied. Now, making the 'host' value set from
    'localhost' to '%' would tell MySQL that you are allowing connections created from
    outside the MySQL host to connect to the server.
    Another way to go around this is problem is to modify your
    "\Windows\system32\drivers\etc\hosts" OR "/etc/hosts" file and give
    your loopback address (127.0.0.1) another alias (aside from localhost), e.g.:
    127.0.0.1    localhost    <hostnameY.domain>
    192.168.1.1  <hostnameX.domain>  <hostnameY.domain>where you replace <hostnameY.domain> with the name/alias of your computer in
    the network. The domain is optional and depends upon the domain name that
    your network is using.

  • Jsp jdbc connectivity problem.

    i'm getting the following error
    "HTTP Status 500-----
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /create_user.jsp(2,4) Invalid directive
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:527)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1568)
    org.apache.jasper.compiler.Parser.parse(Parser.java:132)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)"
    for the jsp file is :
    <%@ page import="java.sql.*" %>
    <%@ //page errorPage="exceptionHandler.jsp"%>
    <%
    String connectionURL = "jdbc:mysql://localhost:3306/decipher?user=localhost;password=passwd";
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;
    %>
    <html><body>
    <%
    String nr="nr";
    String a= request.getParameter("emp_id");
    String b= request.getParameter("name");
    String c= request.getParameter("department");
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    connection = DriverManager.getConnection(connectionURL, "root", "passwd");
    statement = connection.createStatement();
    statement.executeUpdate("use decipher");
    statement.executeUpdate("Insert into candidate_details values ('" +a+ "','" +b+ "','" +c+ "')");
    %>
    sucesssfully created New Account
    </body>
    </html>"

    bmahesh7feb wrote:
    org.apache.jasper.JasperException: /create_user.jsp(2,4) Invalid directiveAt line 2, character 4 of create_user.jsp there's an invalid directive. This is a plain code syntax error.
    <%@ //page errorPage="exceptionHandler.jsp"%>What are those slashes doing there? Do you think that those Java style comments outcomments the JSP line? It is JSP code, it is not Java code. Remove the whole line or use JSP comments.
    As for the remnant of your JSP code, there are a lot of flaws in there. First step to in the right direction would be to stop using scriptlets in JSP. Good luck.

  • Jsp-database connectivity problem

    hi
    There is a problem, when ever i write a jdbc code for database connectivity through MsAcess, in general applications it works fine. But when ever i try to the same using Jsps it throws an exception that " Microsoft jdbc-odbc driver not fount, Default driver not specified"
    please do help regarding this
    the code i used is
    package Products; import java.sql.*;import java.util.*; public class product{          public Vector getCategories()     {          Connection con;          Statement st;          ResultSet rs;          Vector ret=new Vector(1,1);          try          {               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");               con=DriverManager.getConnection("jdbc:odbc:Web");               st=con.createStatement();               rs=st.executeQuery("Select * from Categories");               while(rs.next())               {                         ret.add(rs.getString(2));                    );               }          }          catch(Exception e)          {               //System.out.println("Exception...");               ret.add(e.getMessage());          }          return ret;     }}

    Have you downloaded the driver and put it in your Web-Server?
    In tomcat you simply need to copy the file in:
    Tomcat 5.0\common\lib

  • MySQL connectivity problem: no validation table provided

    hi there,
    As a superbeginner, on my Mac G4 OSX 10.4 I am trying to add a MySQL database in Sun JSC 2.1, following the tutorial:
    Creating Database Server Types and Data Sources
    So far I have managed to
    -install mysql 3.1.14 and
    -add this as a new database server
    When I try to add a data source, I cannot select a validation table (message: No Tables were found. Check your connection information), and I cannot find in the manuals how to make one. When I test the connection the connection status is succeeded, but the validation table status is failed (No validation table provided...)
    In a seccond attempt, I also installed MySQL 4.1.21 and navicat (in which the connection seems to be good), but I cannot figure out how to connect this version 4.1.21 to the JSC, because 4.1.21 differs in installation (it uses an installation package in stead of a zipped folder) which is not covered by the tutorial.
    Any hints on one of the two attempts, or a suggestion for a database which might give a beginner like me less problems to connect? Thanks a lot.
    [email protected]

    I think the simplest way is:
    create a table:if you have mysql 5.x you can di it with mysql tools (mysql administrator or mysql query browser), if you have a non graphical version of mysql you have to create the table with prompt.
    Create table Paziente (
         codice_fiscale_paziente Char(20) NOT NULL,
         nome Char(20),
         cognome Char(20))
         ENGINE = MyISAM;
    than open JSC (it doesn't have a jdbc driver installed to work with mysql, you have to download from mysql website and install in jsc)
    servers--> right click -->add data source
    than :
    data source name : the name you want to use
    server type: mysql
    database name : your's database name
    if you have user autentication in your db, set user and password
    set the correct db url
    and... test connection
    it should work

  • DW CS4 MySQL Connection Problem

    I know this one has been covered before but i've been trawling through posts for the past 2 days and still haven't solved my problem.
    I remember from using MX Studio and Ultradev that setting up a connection could prove challenging. It seems that CS4 is just as user-unfriendly in this regard. I know that the settings i'm using for the connection must be correct as i'm using them to successfully connect to the database and display its records using a hand-coded page. I've tried disabling Kaspersky and Windows Firewall but to no avail. I noticed one difference between the php script that dw attempted to make and mine is that i'm using mysqli whereas the dw version just refers to mysql. When I click on the Select button to try and select the database i just get  "An unidentified error has occurred" - about as much use as a chocolate fireguard - well done to the dw development team for that pearl of wisdom. Is dw trying to find my databse somewhere where it's not located? I noticed that C:/InetPub and its subfolders are marked "read only" but when you uncheck this, it reverts to read only - i don't know if this may have something to do with my inability to set up a connection. I managed to manually set up MySQL, PHP and Apache without problems but this has got me beat. Is it bad design in dw or am i just stupid? Don't answer that! Any help would be greatly appreciated as i know there's a lot of good stuff in dw if i could only make a connection (and i'm on a 30 day trial with this) Why should something that looks so easy be so difficult! Thanks, Mark

    Hi PZ,
             You're correct! I just managed to get my connection to work. I looked in my php.ini file and it only had extension=php_mysqli.dll at the bottom of the page (the dll file to which this refers was in the ext folder). So, I just added extension=php_mysql.dll to the end of the php.ini file then downloaded the PHP 5.2.13 zip package from http://www.php.net/downloads.php and then copied the file php_mysql.dll into the ext folder. I got the clue about mysqli not being supported after i'd carried out a Site > Advanced > Remove Connection scripts - that at least gave me a message "Your PHP Server doesn't have the MySQL module loaded or you cant use the mysql(p) connect functions" - before i did this i just got a useless "An unidentified error has occurred" which left me no further forward. Thanks for your help!

  • JDBC MYSQL Connection Problem

    Hi guys I have created a database called books in MySQL and I have the following code to test the link of connection. I am using Netbeans.
    import java.sql.*;
    public class jdbcexample1 {
    /** Creates a new instance of jdbcexample1 */
    public jdbcexample1() {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql:///books", "jhtp6", "jhtp6");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    However my program when run gives me the exception message which is
    "Exception: com.mysql.jdbc.Driver"
    Before you tell me, I have put the "mysql-connector-java-3.0.14-production-bin" in the ext folder of jre and I have also appended the CLASSPATH as follows.
    ".;C:\PATH\mysql-connector-java-3.0.14-production-bin.jar;" which leads to the jre ext folder.
    What am I doing wrong, Have I missed something above and if not what could be wrong with my setup.
    Thanks!! :)

    Helo,
    I have just started with java, I am also using netbeans, I used similar code to test the link, the code gives the following error when compiled:
    java.lang.NoClassDefFoundError: JdbcExample1
    Exception in thread "main"
    Java Result: 1
    The code I used is a s follows:
    package com.stardeveloper.example;
    import java.sql.*;
    public class JdbcExample1 {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql:///pet", "root", "siemens");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    Pls help..
    Thanks..
    Hi guys I have created a database called books in
    MySQL and I have the following code to test the link
    of connection. I am using Netbeans.
    import java.sql.*;
    public class jdbcexample1 {
    /** Creates a new instance of jdbcexample1 */
    public jdbcexample1() {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con =
    DriverManager.getConnection("jdbc:mysql:///books",
    "jhtp6", "jhtp6");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL
    server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    However my program when run gives me the exception
    message which is
    "Exception: com.mysql.jdbc.Driver"
    Before you tell me, I have put the
    "mysql-connector-java-3.0.14-production-bin" in the
    ext folder of jre and I have also appended the
    CLASSPATH as follows.
    ".;C:\PATH\mysql-connector-java-3.0.14-production-bin.
    jar;" which leads to the jre ext folder.
    What am I doing wrong, Have I missed something above
    and if not what could be wrong with my setup.
    Thanks!! :)

  • JDBC and MySQL connectivity problem

    The code i hav attached generates Connectivity exception.. the prob is with the part in bold.. can anyone help
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class testconn {
      public static void main(String args[]) {
        Connection con = null;
                String serverName = "localhost:8080";
            String mydatabase = "imagedb";
            String url = "jdbc:mysql://" + serverName +  "/" + mydatabase; // a JDBC url
            String username = "am";
            String password = "ta";
        try {
          Class.forName("com.mysql.jdbc.Driver");
         con= DriverManager.getConnection(url, username, password);
          if(!con.isClosed())
            System.out.println("Successfully connected to " +
              "MySQL server using TCP/IP...");
        } catch(Exception e) {
          System.err.println("Exception: " + e);
        } finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    }

    I had such issue too, and I fixed it by adding in the environment variables the CLASSPATH entry that pointed to all the directories containing the .jar needed for the applications.
    for example I used jodbc folder to connect mysql database (I installed last version and I got same issue than yours and it seems to be a 'connector' issue, exactly the same issue than yours) I got something like
    CLASSPATH=my root dir/the java dir/the lib dir/jodbc;my root dir/the java dir/other important libs containing .jar files;
    This is what I got for the issue, still working around (at the level of mysql all is ok, ...)
    Microsoft Windows XP [version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Hurukan>java ConnectJODBC brol
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at ConnectJODBC.main(ConnectJODBC.java:108)
    [exception] -- la valeur de 'con' est nulle (DriverManager � retourn� une valeur
    nulle)
    C:\Documents and Settings\Hurukan>set
    APPDATA=C:\Documents and Settings\Hurukan\Application Data
    CLASSPATH=c:\Program Files\Java\jdk1.5.0_06\lib;c:\Program Files\Java\jdk1.5.0_06\dev;\c:\Program Files\Java\jdk1.5.0_06\lib\jodbc;
    Here is the code that generated this exception
    String dburl="jdbc:mysql://127.0.0.1/nosdisques"; // should be next passed by command line
    String password="**scrambled**";
    String username="**scrambled**";
    Connection con=null;
    Statement stmt=null;
    ResultSet res=null;
    String requete="";
    String strToWrite="";
    // Connexion � la base de donn�e
    // Won't work with mysql 5.0.18, mysql connector 3.51.12 is installed [???]
    // Previous tests with 5.0.18 were running good, that has started with the last os restoration (and the connector was different of course...)
    // tried to retreive older version of the mysql connector
    try
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con=DriverManager.getConnection(dburl,username,password);
    System.out.println("Nous sommes connect\u201as \u2026 la base " + con.getCatalog());
    catch(SQLException sqlex)
    System.out.println("[sqlexception]\n");
    System.exit(3);
    catch(Exception ex)
    ex.printStackTrace();
    if(con == null)
    System.out.println("[exception] -- la valeur de 'con' est nulle (DriverManager \u2026 retourn\u201a une valeur nulle)\n");
    System.exit(4);
    System.out.println("Impossible to join database, access denied\n");
    System.out.println("Verify settings (mysqld or firewall)\n"); System.exit(2);
    Maybe the drivers used (last one: connector/j 3.1.12). The .jar file is in the %classpath% directory c:\Program Files\Java\jdk1.5.0_06\lib.
    Can't really understand why this code won't run anymore, ...
    I took a look on the other computer where the same code is running ok.
    These are the differences:
    mysql server is 5.0.18 on the other computer the version is 3.23.41
    mysql connector is 3.51.12 on the other computer the version is 3.0.10
    access rights are the same because the database is the dumped one from 3.23.41 to 5.0.18, and I'm quite good with the dbms management (I'm IT developper in fact, trying to take over java technology ;) )
    in this case this is not a sql error but java error.
    the jar file is set to the %classpath% folder on both computers
    I copied the jar from the other computer, removing the new .jar file and... it failed, exactly the same issue
    Still working around, ...
    Dimitri

  • JSP Timoeut connection problem

    I'm developing a little demo Search Engine program using JSP and Tomcat4.1.18. After I launch the query my program calculates the results, and it may take a few minutes. But after a bit Tomcat gives me the message "timeout connection", while my application is still calculating. How can I set the Jsp in order to keep the server in waiting?
    Thanks
    David

    In the web.xml configuration file of your tomcat you can set the session timeout time.

  • DW CS3 MySql Connect Problems Local Mac

    Hi,
    I switched from CS2 to CS3, somewhere along the way I can no
    longer connect to MySql doing local testing. I know the MySql
    server works as I can connect to it and work with tables etc with
    Navicat.
    I keep getting:
    Warning: mysql_pconnect() [function.mysql-pconnect]: Can't
    connect to local MySQL server through socket
    '/var/mysql/mysql.sock' (2) in
    /Users/Rich/Sites/Site/htdocs/Connections/Main.php on line 9
    Fatal error: Can't connect to local MySQL server through
    socket '/var/mysql/mysql.sock' (2) in
    /Users/Rich/Sites/Site/htdocs/Connections/Main.php on line 9
    Anybody got any ideas?
    Thanks
    Rich

    I'm running 10.5.8 so this may be completely the wrong answer...
    Have you set the privileges on the MySQL user on the server database to allow a connection from a remote client IP Address?
    You can do this via phpMyAdmin user privileges or as a MySQL command, something like
    GRANT SELECT ON <database>.<table>
    TO <user>@'<IP address of client>'
    IDENTIFIED BY "<password>";
    The IP address can contain a wild character, e.g. 192.168.1.%
    john

  • Migration from MySQL - connection problem

    I've just installed OMWB 1.3.1 for WINDOWS and created repository in ORACLE 8.0.5 DB.
    When I enter Source Database Details in Capture Wizard and push Next button nothing is happened. In OMWB log-file I've found the following message among many others:
    Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError: org/gjt/mm/mysql/Driver
    at java.util.Vector.<init>(Vector.java:128)
    The directory C:\Oracle\oracle81\Omwb\drivers\
    is empty while in CLASSPATH env variable I've found the following item:
    C:\Oracle\oracle81\Omwb\drivers\mm.mysql.jdbc-1.2a
    If anybody could help me to solve this problem, please let me know.
    Thank you in advance.
    null

    Hi Vladimir,
    I send you a message from the Migration Workbench team that solved my problem. I hope this will resolve yours too.
    Bye,
    Pierfrancesco
    Hi Pierfrancesco
    MySQL 3.22, 3.23 Requirements
    In order to migrate from MySQL to Oracle, you must install the MM MySQL JDBC
    driver release 1.2a on the same system as the Migration Workbench. You can
    obtain this by downloading the MM MySQL JDBC driver from the WorldServer Web
    site at:
    http://www.worldserver.com/mm.mysql
    Copy and unzip the mm.mysql.jdbc-1.2a.zip file to your
    %ORACLE_HOME%\Omwb\drivers directory. This automatically creates a new
    directory called
    mm.mysql.jdbc-1.2a within the drivers directory.
    Can you please verify that you have this driver extracted to the above
    specified directory. Another check you can do is see whether all the files in
    the zip
    have extracted.
    Please refer to the Release notes which you have access to by selection the Help
    drop down menu in the Workbench.
    I hope this helps
    Best regards
    Oracle Migration Workbench Support
    null

Maybe you are looking for

  • Sound Stuttering in Windows 7 - Please Help

    Hello there, I hope you can help?! Ever since I bought my P6320UK HP Pavilion Desktop i have been having intermittent issues playing sound. The audio stops and starts and is distorted. I have gone down every available avenue, been in touch with HP, P

  • Doubts in statistic Delivery Date and Commited Date in STO PO

    Hi, I would like to know statistic delivery date and Commited Delivery date in STO PO. 2 different type of date is displaying STO PO like; 1. We are getting statistic delivery as "09.02.9999" and Commited Date as "09.02.2011" 2. 1. We are getting sta

  • Cisco 7925 and Singlewire PustToTalk no voice

      Hello,      I am in the middle of implementing a Singlewire PushToTalk system in a wireless network with Cisco 5508 WLCs and Cisco 7925 phones.     I managed to configure everything and PTT works with the exception that from time to time there is a

  • How to upgrade?

    Im trying to upgrade from panther to tiger whats the best way ??? This is very urgent since my fiancee (who is about to kill me) bought her iPhone and now we are unable to do anything with it since it needs iTunes 7 and therefore tiger as a minimum

  • Master data infoobject can't handle duplicate records after SP10

    Hi I am trying to load master data which happened to contain duplicate records from the source system.  In the DTP of the master data infoobject, I have ticked the 'Handle Duplicate Record Keys' checkbox.  After executing this DTP, the duplicate mast