Connecting to mySQL database, timeout error

I am having problems connecting to my database, here is the connection class
public class DBConnect
    public static Connection getDBConnect() throws Exception
        String x = "worked";
        //String url = "jdbc:mysql://mysql8.secureserver.net";
        String url = "jdbc:mysql://mysql13.secureserver.net/DBName?user=User&password=Password";
        System.out.println("Before driver load");
        try
            Class.forName("com.mysql.jdbc.Driver");
            System.out.println("Driver Loaded");
        catch(java.lang.ClassNotFoundException e)
            System.err.print("ClassNotFoundException: ");
            System.err.println(e.getMessage());
        System.out.println("After driver loaded and Before connect");
            Connection con = DriverManager.getConnection(url);
            System.out.println("Tried connect");
            return con;       
}here is the error:
INFO: Server startup in 17685 ms
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection timed out: connect
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection timed out: connect
     at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
     at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
     at com.mysql.jdbc.Connection.createNewIO(Connection.java:1765).....

4. The username and password are incorrect, and it's
hanging waiting for you to enter new ones. (I've had
this happen before with Oracle).Sir,
A good point but MySQL will just bomb out in this case.
Another possibility is do you have the latest JConnect driver? The old drivers have protocol issues talking with the newest versioned servers.. but the new drivers are backwards compatible.
Sincerely,
Slappy

Similar Messages

  • Help with connection to mysql database, Getting error : No suitable Driver

    Below is my code :
    1) i have added the mysql driver (mm.mysql-2.0.14-bin.jar)in my classpath
    2) the code is getting compiling properly
    3) while running it using tomcat, it says "NO SUITABLE DRIVER"
    PLEASE HELP !!
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class logincheck extends HttpServlet {
    public void doGet(HttpServletRequest request,HttpServletResponse response)
    throws IOException, ServletException
    Connection con = null;
    PrintWriter out = response.getWriter();
    response.setContentType("text/html");
    PreparedStatement stmt = null;
    ResultSet rs = null;
    String userid = request.getParameter("userid");
    String password = request.getParameter("password");
    try {
    /** LOADING THE DRIVER FOR MYSQL DATABASE ***/
    Class.forName ("org.gjt.mm.mysql.Driver";
    } catch (ClassNotFoundException e) {
    e.printStackTrace();
    } //End of try-catch 1
    try{
         /*** CONNECTING TO THE DATABASE USING DATABASE NAME, USERNAME AND PASSWORD */
    con = DriverManager.getConnection("jdbc:mysql://localhost:8080/own");
    /****** this checks whether the entry for the user is in the database *****/
    stmt = con.prepareStatement("SELECT *FROM userinfo WHERE userid = ? AND passwd = ?");
    stmt.setString(1,userid);
    stmt.setString(2,password);
    rs = stmt.executeQuery();
    if(!rs.next())
    else
         /****************** IF THE USER AND PASSWORD ARE VALID *****************/
    //} // END OF RS.....
    // NEED HTML FOR INVALID USERID SHOWING MESSAGE ...
    con.close();
    }catch(SQLException esql){
    System.out.println(esql.getMessage());
    } // End of try-catch 2
    } // goGet
    public void doPost(HttpServletRequest request,HttpServletResponse response)
    throws IOException, ServletException {
    doGet(request, response);
    } // goPost
    } // end logincheck function ...

    And i see another thing that confuses me. Your URL connection string is
    con = DriverManager.getConnection("jdbc:mysql://localhost:8080/own"); meaning that your database is in your machine and listens in port 8080 for incoming connections. But that is the default port that Tomcat listens! Maybe you should change this line to
    con = DriverManager.getConnection("jdbc:mysql://localhost:3306/own");where 3306 is MySQL's default port.
    Hope these help.

  • Error: OGG-00146 - error 600 - Failed to connect to mysql database

    Dear All,
    I am replicating Data from MySQL to Oracle.
    Version of my MySQL is Server version: 5.5.19 MySQL Enterprise Server - Advanced Edition
    Version of Oracle is : Oracle 11gR2
    My extract is giving the following error and I am unable to identify the problem:
    *2012-12-25 14:18:48 ERROR OGG-00146 Oracle GoldenGate Capture for MySQL, netfors.prm: VAM function VAMInitialize returned unexpected result:*
    error 600 - VAM Client Report <CAUSE OF FAILURE : Failed to connect to mysql database WHEN FAILED : While initializing mysql context WHERE FAILED :
    MySQLBinLog Reader Module CONTEXT OF FAILURE : No Information Available!>
    Following are the contents of my /etc/odbc.ini file
    *[netfors]*
    Driver = /usr/lib/libmyodbc3.so
    Description = Connector/ODBC 3.51 Driver DSN
    Server = 10.168.20.226
    Port = 6629
    User = replication
    Password = ******
    Database = netfors
    Option = 3
    Socket = /tmp/mysql_sandbox5519.sock
    When i isql -v netfors replication ***** *
    it say Connected!
    This is my extract:
    EXTRACT NETFORS
    DBOPTIONS HOST 10.168.20.226, CONNECTIONPORT 6629
    SOURCEDB [email protected]:6629, USERID replication, PASSWORD ******
    RMTHOST 10.168.20.31, MGRPORT 7809
    RMTTRAIL /u01/app/oracle/oradata/GG/dirdat/n1
    TRANLOGOPTIONS ALTLOGDEST /root/sandboxes/msb_5_5_19/data/mysql-bin.index
    TABLE netfors.syslog;
    Extract gets ABENDED
    Kindly help on this.
    Regards, Imran

    Got it solved some how, golden gate was trying to connect with default socket file.
    */tmp/mysql.sock*
    while my socket file was
    */tmp/mysql_sandbox5519.sock*
    I changed it to default and got rid of the error.
    Thanks for the help.
    Regards, Imran

  • JSP, EJB in Jboss 4 with mySQL database. Error in connecting to database

    Hi, i using JBoss 4-0-1 with jsp and mySQL database. I get this example from a book using stateless session beans. However i modify it so it can connect to mySQL database.
    This is my code for jsp.
    <%@ page import="asg.MusicEJB.*,
    java.util.*,
    javax.naming.Context,
    javax.naming.InitialContext,
    javax.rmi.PortableRemoteObject" errorPage="error.jsp" %>
    <%--
         The following 3 variables appear in a JSP declaration.
         They appear outside the generated _jspService() method,
         which gives them class scope.
         Since we want to initialize our Music EJB object once
         and read the Music Collection database to get the
         recording titles once, we place this code inside
         method jspInit().
         The EJB business method getMusicList()
         returns a collection of RecordingVO objects which we
         store in ArrayList albums.
    --%>
    <%!
         MusicHome musicHome;
         Music mymusic;
         ArrayList albums;
         Properties properties=new Properties();
         public void jspInit() {
                   properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                   properties.put(Context.PROVIDER_URL, "localhost:3306");
                   System.out.println("............................in properties");
              try {
                   //Context initial = new InitialContext();
                   InitialContext jndiContext = new InitialContext(properties);
                   //Object ref  = jndiContext.lookup("MusicEJB");
                   Object objref = jndiContext.lookup("java:comp/env/ejb/EJBMusic");
                   musicHome = (MusicHome)PortableRemoteObject.narrow(objref, MusicHome.class);
                   mymusic = musicHome.create();
                   albums = mymusic.getMusicList();
                   System.out.println(".............................in line 64");
              } catch (Exception ex) {
                   System.out.println("Unexpected Exception............: " +
                             ex.getMessage());
                   ex.printStackTrace();
    %>
    <%--
         The following scriptlet accesses the implicit
         request object to obtain the current URL
         and saves it to the session object for later retrieval. 
         It also saves variable mymusic, so we can
         make remote calls to our Music EJB, and the collection of
         RecordingVO objects.  These variables will all be available
         to other pages within the session.
    --%>
    <%
         String requestURI = request.getRequestURI();
         session.putValue("url", requestURI);
         session.putValue("mymusic", mymusic);
         session.putValue("albums", albums);
    %>
    <html>
    <head>
    <title>Music Collection Database Using EJB & JSP Version 9.7</title>
    </head>
    <body bgcolor=white>
    <h1><b><center>Music Collection Database Using EJB & JSP</center></b></h1>
    <hr>
    <p>
    There are <%= albums.size() %> recordings.
    <form method="post" action="musicPost.jsp">
    <p>
    Select Music Recording:
    <select name="TITLE">
    <%
         // Generate html <option> elements with the recording
         // titles stored in each RecordingVO element.
         // Obtain the current title from the session object
         // (this will be null the first time).
         String title;
         String currentTitle = (String)session.getValue("curTitle");
         if (currentTitle == null) currentTitle = "";
         RecordingVO r;
         Iterator i = albums.iterator();
         while (i.hasNext()) {
              r = (RecordingVO)i.next();
              title = r.getTitle();
              if (title.equals(currentTitle)) {
                   out.println("<option selected>" + title + "</option>");
              else {
                   out.println("<option>" + title + "</option>");
    %>
    </select><p><p>
    <%--
         Provide a "View Tracks" button to submit
         the requested title to page musicPost.jsp
    --%>
    <input TYPE="submit" NAME="View" VALUE="View Tracks">
    </form>
    </body>
    </html>Message was edited by:
    chongming

    This is the deployment descriptor for the .ear file.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
    <application>
      <display-name>MusicDAOApp</display-name>
      <description>Application description</description>
      <module>
        <web>
          <web-uri>war-ic.war</web-uri>
          <context-root>music</context-root>
        </web>
      </module>
      <module>
        <ejb>ejb-jar-ic.jar</ejb>
      </module>
    <!--
      <module>
        <java>app-client-ic.jar</java>
      </module>
    -->
    </application>
    And this is the deployment for the ejb class files:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
      <display-name>MusicEJB</display-name>
      <enterprise-beans>
        <session>
          <display-name>MusicEJB</display-name>
          <ejb-name>MusicEJB</ejb-name>
          <home>asg.MusicEJB.MusicHome</home>
          <remote>asg.MusicEJB.Music</remote>
          <ejb-class>asg.MusicEJB.MusicBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Bean</transaction-type>
          <env-entry>
            <env-entry-name>MusicDAOClass</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>asg.MusicEJB.MusicDAOCloudscape</env-entry-value>
          </env-entry>
         <env-entry>
         <env-entry-name>dbUrl</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>jdbc:mysql://localhost/music</env-entry-value>
          </env-entry>
          <env-entry>
            <env-entry-name>dbUserName</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>chongming</env-entry-value>
          </env-entry>
          <env-entry>
            <env-entry-name>dbPassword</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>kcm82</env-entry-value>
         </env-entry>
          <security-identity>
            <description></description>
            <use-caller-identity></use-caller-identity>
          </security-identity>
        </session>
      </enterprise-beans>
    </ejb-jar>I can combine the jar and war files into a ear file. deploying is alright without any errors.
    However when i run the jsp, it prompt this error:
    You Have Encountered an Error
    Stack Trace
    java.lang.NullPointerException
         at org.apache.jsp.musicGet_jsp._jspService(org.apache.jsp.musicGet_jsp:111)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:595)
    How to i solve the error? I look at he catch results in the command prompt of JBoss , i found that when running, the code will be caught by the exception and display this:int.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
    kerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    13:55:21,375 INFO [STDOUT] Unexpected Exception............: EJBException:; nes
    ted exception is:
    javax.ejb.EJBException: getMusicList: SQLException during DB Connection:
    The url cannot be null
    13:55:21,375 INFO [STDOUT] java.rmi.ServerException: EJBException:; nested exce
    ption is:
    javax.ejb.EJBException: getMusicList: SQLException during DB Connection:
    The url cannot be null 13:55:21,375 INFO[STDOUT] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:352)
    13:55:21,375 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196)
    What can i do to solve the problem? please helpMessage was edited by:
    chongming
    Message was edited by:
    chongming
    Message was edited by:
    chongming

  • I can't connect to MySQL database from The JSP Standard Tag Library

    Hi All !
    I have a problem, please help me anybody !
    I don't connect to MySQL database from jsp page using JSTL tag but from servlet all work correctly. I set my path and put �mysql-connector-java-3.1.13-bin.jar� in ENVIRONMENT WinXP(classpath=C:\Java\jdk1.5.0_10\jre\lib\ext\mysql-connector-java-3.1.13-bin.jar) and in War project folder �WEB-INF/lib� and in [TomcatServer]\common\lib.
    I have in folder�WEB-INF/lib� following files:
    antlr.jar
    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-fileupload.jar
    commons-logging.jar
    commons-validator.jar
    jakarta-oro.jar
    jsf-api.jar
    jsf-impl.jar
    jstl.jar
    mysql-connector-java-3.1.13-bin.jar
    standard.jar
    struts.jar
    I'm using:
    NetBeans 5.5 Build200610171010 (bundled Tomcat 5.5.17)
    Ent.Pack 20061020 Visual Wb Pack 061103
    OS WinXP SP2
    Java 1.5.0_10
    MySQL 5.0.18-nt
    1:<%@page contentType="text/html"%>
    2:<%@page pageEncoding="UTF-8"%>
    8: <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    9: <%@taglib uri="http://java.sun.com/jstl/sql" prefix="sql"%>
    10:
    11: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    12: "http://www.w3.org/TR/html4/loose.dtd">
    13:
    14: <sql:setDataSource var="ds"
    15: driver="com.mysql.jdbc.Driver"
    16: url="jdbc:mysql://localhost:3306/test"
    17: user="root"
    18: password="xxxx"/>
    19:
    20:
    21:<sql:query sql="select name, age from People" var="res"
    22: dataSource="${ds}"/>
    I have received report on mistake when entered code at the top:
    �/index.jsp [21;0] According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions�
    I used instead of (dataSource="${ds}")->(dataSource="ds") but this did not work.
    After build and run I have received
    =========================================START=================================
    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: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    org.apache.jasper.JasperException: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
    org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:955)
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
    org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
    org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
    org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
    Apache Tomcat/5.5.17
    =======================================END================================
    Error: "According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions" - but according to documentation such parameter possible.
    BUT WHEN JOINING With DATABASE FROM SERVLET ALL WORK FINE.
    I read this doc - [http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html], this applicable if I Tomcat Admin, but i'am not Admin
    I simply user, i.e. I want to place its database on virtual host (Tomcat+(JSP-JSTL)+MySQL).
    There is idea how can resolve this problem
    Thank you in advance ;)

    For all how have similar problem.
    Decision instead of these ways
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    it is necessary to indicate these
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

  • Connecting a MYSQL database in Dreamweaver

    Hi All,
    I'm tryting to connect a mysql database based locally and am getting the error:
    HTTP Error Code 404 File Not Found. Here are some possible reasons for the problem:
    1) There is no testing server running on the server machine.
    2) The testing server specified for this site does not map to the http://localhost/_mmServerScripts/MMHTTPDB.php. Verify that
    the URL Prefix maps to the root of the site.
    What does this mean?
    How do I start the testing server? I'm unable to locate the folder where the database files are stored as the database has been created locally on my machine.  Everything hace been created locally so I know that point 2) could well be irrelavant.
    Please can somebody help?
    Many Thanks
    Gordon

    The functions for connecting to a database were mostly deprecated.  But if you enable them in CS6 Cloud/CC then they will be the same.

  • Unable to connect to MySQL Database using MX

    I am unable to connect to MySQL database hosted on a remote
    server. I get the following error message:
    "HTTP Error Code 404 File Not Found. Here are some possible
    reason for the problem:
    1) There is no testing server running on the server machine.
    2) The testing server specified for this site does not map to
    the
    http://72.9.255.2/~keyitems/_mmServerScripts/MMHTTPDB.php
    URL. Verify that the URL Prefix maps to the root of the site."
    I have specified a testing server. My url is "
    http://72.9.255.2/~keyitems/........."
    For the URL prefix to the site's root folder, I listed the
    following:
    1.
    http://72.9.255.2/~keyitems/
    this did not work. I got the above error message.
    2.
    http://72.9.255.2/ this did not work
    also. I got the above error message.
    Any input would be great as I do not know where to start !!!
    Thank you

    Hi Ravi
    Glad to hear you solved this. It is very gratifying when one solves it alone, don't you think?
    Best wishes
    Michael

  • Connecting to mysql database using DBLOGIN

    I am trying to connect to a mysql database through GG command interface and am unable to get the DBLOGIN to work correctly. Here is what I am getting:-
    mysql world -u root -p<password> (as user OS user mysql- works!)
    GGSCI (rac1) 5> DBLOGIN SOURCEDB world, USERID root, PASSWORD <password>
    2010-11-08 16:29:17 WARNING OGG-00769 MySQL Login failed: . SQL error (2002). Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).
    ERROR: Failed to connect to MySQL database engine for HOST localhost, DATABASE world, USER root, PORT 0.
    I am not too familiar with mysql and will appreciate help and also pointer to documents that walk through setting up and testing Golden Gate with mysql.
    Thanks,
    Satish

    hi.
    i have same problem can't connect to mysql using dblogin on ggsci, please helpme
    this my.cnf configuration
    # Example MySQL config file for small systems.
    # This is for a system with little memory (<= 64M) where MySQL is only used
    # from time to time and it's important that the mysqld daemon
    # doesn't use much resources.
    # You can copy this file to
    # /etc/my.cnf to set global options,
    # mysql-data-dir/my.cnf to set server-specific options (in this
    # installation this directory is /var/lib/mysql) or
    # ~/.my.cnf to set user-specific options.
    # In this file, you can use all long options that a program supports.
    # If you want to know which options a program supports, run the program
    # with the "--help" option.
    # The following options will be passed to all MySQL clients
    [client]
    #password     = your_password
    port          = 3306
    socket          = /tmp/mysql.sock
    #socket = /var/run/mysqld/mysqld.sock
    # Here follows entries for some specific programs
    # The MySQL server
    [mysqld]
    port          = 3306
    socket = /tmp/mysql.sock
    #socket          = /var/run/mysqld/mysqld.sock
    skip-locking
    key_buffer_size = 16K
    max_allowed_packet = 1M
    table_open_cache = 4
    sort_buffer_size = 64K
    read_buffer_size = 256K
    read_rnd_buffer_size = 256K
    net_buffer_length = 2K
    thread_stack = 128K
    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (using the "enable-named-pipe" option) will render mysqld useless!
    #skip-networking
    server-id     = 1
    # Uncomment the following if you want to log updates
    #log-bin=mysql-bin
    # binary logging format - mixed recommended
    #binlog_format=mixed
    # Uncomment the following if you are using InnoDB tables
    #innodb_data_home_dir = /var/lib/mysql/
    #innodb_data_file_path = ibdata1:10M:autoextend
    #innodb_log_group_home_dir = /var/lib/mysql/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    #innodb_buffer_pool_size = 16M
    #innodb_additional_mem_pool_size = 2M
    # Set .._log_file_size to 25 % of buffer pool size
    #innodb_log_file_size = 5M
    #innodb_log_buffer_size = 8M
    #innodb_flush_log_at_trx_commit = 1
    #innodb_lock_wait_timeout = 50
    [mysqldump]
    quick
    max_allowed_packet = 16M
    [mysql]
    no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates
    [myisamchk]
    key_buffer_size = 8M
    sort_buffer_size = 8M
    [mysqlhotcopy]
    interactive-timeout

  • Connecting to MySQL Database with Servlet

    Hi All,
    I want to connect to MySQL Database from servlet.
    I am using Tomcat websever 3.3.1, where i have to set classpath of mysql jdbc driver.
    I tried by copying mysql jdbc driver in so many directiories of Tomcat server but it is
    giving me error like "no specified driver find"
    So please send me all the solutions and how to set the classpath to connect to
    mysql database.
    Thanks

    U r correct that so many people are giving me solutions but that are not working for me
    I think i not correct in setting the classapath to mysql jdbc driver.
    1)I have unjarred correctly and all the classes are present in that.
    yes driver class is there in that .
    2)Now i am using new version of the mysqljdbc that is 2.0.13
    If now any driver after this send me url i will download it and use it
    3)I am unable to under stand what is yourcontext in
    yourcontext/web-inf/lib?
    This is my directory structure.
    c:tomcat in this i have
    bin
    conf
    doc
    lib
    logs
    modules
    native
    webapps
    work
    in bin there are no subdirectories
    in conf i have
    auto,jserv,jk,users
    in doc i have
    appdev,images
    sample( in appdev)
    etc,lib,src,web(in sample)
    images(in sample\web)
    in lib i have
    apps
    common
    container(c:\tomcat\lib)
    in logs,modules there are no subdirectories
    in native (c:\tomcat\native) i have
    mod_jk
    mod_jserv
    in mod_jk i have
    apache 1.3
    common
    iis
    jni
    netscape
    nt_service
    in webapps i have (c:tomcat\webapps)
    Admin,Examples,root
    in Admin i have (c:\tomcat\webapps\admin)
    contextadmin
    Meta-inf
    Test
    Web-inf
    in web-inf (c:\tomcat\webapps\admin\web-inf)
    Classes,lib,script
    in classes i have (c:\tomcat\webapps\admin\web-inf\classes)
    tadm
    in examples (c:\tomcat\webapps\examples) i have
    Images,Jsp,Meta-inf,Servlets,Web-inf
    in web-inf (c:\tomcat\webapps\examples\web-inf) i have
         Classes,jsp
    in classed (c:\tomcat\webapps\examplesweb-inf\classes) i have
    Cal
    Checkbox
    Colors
    Dates
    Error
    Examples
    Num
    Sessions
    in jsp (c:\tomcat\webapps\examples\web-inf\jsp) i have
    applet          
    I think this is enough to give correct answer for me .
    Thanks

  • CONNECTING TO MySql DATABASE FROM Jdeveloper

    Hi,
    How can i connect to MySql database form Oracle Jdeveloper version 11.1.2.0.0.
    I was trying to create connection using create database connection dialog box but it is giving this error:
    Test failed: Driver class not found.
    Verify the Driver location
    Please can I get step by step procedure on how to create this connection.
    Thanks.

    Connect JDeveloper to a MySQL database - YouTube
    http://people.cis.ksu.edu/~hankley/d764/tut06/Ross_mySQL/mySQL.htm
    Hil &amp;amp; Co IT Solutions: Connecting to MySQL in JDeveloper

  • Cs3 connect to mysql database

    hi,
    i am having problems with my xp machine running cs3. when i try to connect to mysql database it throws back http error code 405 method not allowed.
    i downloaded the script replacement files after googling however that still never resolved the issue. can anyone help?
    many thanks

    This may, or may not, help...
    For those using MySQL - Installing PHP and MySQL on Windows
    XP
    http://www.webassist.com/professional/products/solutionrecipes.asp

  • Can I connect to MySQL database

    sorry for my English...
    I'm absolutely new in Flex
    can I connect to MySQL database?
    I read here that I need to create a java class file and edit
    an xml to create connection to oracle, can I connect to MySQL
    server too, I think that the PHP-XML is too slow to work with lare
    amounts of data... so can you post me MXML, the XML, and the JAVA
    class file, with I will be able to send sql to mysql server and get
    the response?
    or FDS is a stand-alone SQL server?

    Flex is not a SQL server.
    The Flex SDK and compiler supports developing applications
    that run in the Flash player.
    Flex Data Services is deployed as a Java web application that
    simplifies integrating Flex clients with Java server-side resources
    (including interacting with SQL databases via Java).
    FlexBuilder is an IDE for developing Flex apps.
    I'd recommend spending some time browsing the Flex product
    area on adobe.com.
    Best,
    Seth

  • Error when connecting to MySQL Database

    I am trying to connect to MySQL and receive an error everytime. I have attempted to talk to Bluehost (who my site is hosted thru) and they said it is not on their end and not something they can help me with. I set up a new MySQL Database with Bluehost and then set up the site through DW and everything went fine. I secured an ftp connection and went on to connect to MySQL. When I enter in my credentials for SQL Database, it returns:
    HTTP Error Code 404:
    Reason 1. No testing server running on the server machine.
    Reason 2. Testing server specified for this site deos not map to the http://my_domain.com/_mmServerScripts/MMHTPDB.php URL. Verify the URL Prefix maps to the site.
    The testing server model I am using is set to PHP MySQL and URL Prefix I am using (my_domain.com) is my website URL. I watched a YouTube video someone suggested elsewhere on how to add MMHTTPDB.php and mysql.php files to _mmServerScripts folder since the folder is empty but unfortunately, those files are not found on my computer. I assume they were supposed to be installed when I installed DW, but they are not here. I have done a general search of the comp and looked in each folder that was installed with DW and sadly, no files that match those names. What can I do? How can I make an SQL connection? Please help. It is greatly appreciated.
    -Sharon

    Your answer can be found somewhere in here http://forum.wampserver.com/read.php?2,83382,88694
    My hosts file (c:\windows\system32\drivers\etc\hosts) looks like
    # Copyright (c) 1993-2009 Microsoft Corp.
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    # For example:
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    # localhost name resolution is handled within DNS itself.
        127.0.0.1       localhost
        ::1             localhost

  • Error connecting to MySQL database

    Well I am a beginner trying to get the basics of JDBC. I am following a simple connection tutorial and I cannot even make this work. I receive an error when I run the program. It is a nested error that begins with "java.io.EOFException". I'm thinking it has something to do with the URL I am using to connect to the database. Any ideas?
    Here is the code I am using if that helps at all.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class jdbctry {
      public static void main(String args[]) {
        Connection con = null;
        try {
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          con = DriverManager.getConnection("jdbc:mysql://url:port/database",
          if(!con.isClosed())
            System.out.println("Successfully connected to " +
              "MySQL server using TCP/IP...");
        } catch(Exception e) {
          System.err.println("Exception: " + e.getMessage());
        } finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    } edit- I think the problem was I had a bad port number assigned to the URL. This time I got a "java.net.SocketException" error. It says my connection timed out.
    Message was edited by:
    lw22

    I'll assume that you've substituted appropriate values into that connection URL, right?
    It s
    // host = IP address or name of machine where MySQL is listening
    // port = 3306 (default)
    // database = instance you wish to connect to
    // username, password have to be GRANTed access rights.
    String url = "jdbc:mysql://host:port/database";Can you connect using the MySQL client and see the database you want in Java? If the client can't connect, neither can JDBC.
    %

  • Error connecting to MySQL database using JNDI

    Hi,
    I'm trying to do a simple connection to a MySQL database using the JNDI look-up
    method.
    Have tried this with the PointBase database that came with WebLogic and got it
    to work successfully.
    However got the attached error message when I tried it on MySQL database. I tried
    this with both the WebLogic's driver for MySQL and also the one I downloaded from
    MySQL (com.mysql.jdbc.Driver), and both failed with the same error message.
    Offhand, it doesn't look like the connection pool is failing. Tested it with WebLogic's
    "Test Pool" function and it was alright.
    Also MySQL database is working properly. Test this by doing simple connection
    and retrieval with simple JDBC connections and it works.
    Any ideas what else I can check with regards to this problem?
    Thanks!
    [att1.html]

    Hi Joe,
    Attached is the config.xml for the domain that I'm working with. There are 3 connection
    pools set-up.
    The problematic Connection Pools are "MySQLCP" and "My JDBC Connection Pool"
    Thanks for your help in this!
    Joe Weinstein <[email protected]> wrote:
    show us the pool definition, as it is in the config.xml file.
    thanks
    joe
    Everbright wrote:
    Hi,
    I'm trying to do a simple connection to a MySQL database using theJNDI look-up
    method.
    Have tried this with the PointBase database that came with WebLogicand got it
    to work successfully.
    However got the attached error message when I tried it on MySQL database.I tried
    this with both the WebLogic's driver for MySQL and also the one I downloadedfrom
    MySQL (com.mysql.jdbc.Driver), and both failed with the same errormessage.
    Offhand, it doesn't look like the connection pool is failing. Testedit with WebLogic's
    "Test Pool" function and it was alright.
    Also MySQL database is working properly. Test this by doing simpleconnection
    and retrieval with simple JDBC connections and it works.
    Any ideas what else I can check with regards to this problem?
    Thanks!
    Error 500--Internal Server Error
    java.sql.SQLException: Cannot obtain connection: driverURL = jdbc:weblogic:pool:MyJDBCConnection Pool, props = {enableTwoPhaseCommit=false, jdbcTxDataSource=true,
    connectionPoolID=MyJDBC Connection Pool, dataSourceName=MyJDBC Data
    Source}.
    Nested Exception: java.lang.RuntimeException: Failed to Generate WrapperClass
         at weblogic.utils.wrapper.WrapperFactory.createWrapper(WrapperFactory.java:141)
         at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:73)
         at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:242)
         at weblogic.jdbc.pool.Driver.connect(Driver.java:158)
         at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
         at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
         at jsp_servlet.__index._jspService(__index.java:142)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
         at weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:395)
         at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:448)
         at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
         at jsp_servlet.__index._jspService(__index.java:142)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    [config.xml]

Maybe you are looking for

  • Music is now classified as Other on Ipod and cannot be accessed

    Hi, something weird just happening. My Ipod was plugged in, and then the computer gave me the "This USB device could be faster" message I get when I plug it in. Then I realize "_'s Ipod" is now in all caps. Then I look at my music, and nothing is the

  • Reading component materials corresponding to header material in PDS

    Hi Experts, My requirement is to get the component materials corresponding to a particular header material in PDS. Please refer me a table from where I can get the component materials corresponding to the header material. Also , I have found out a BA

  • What is the file size of the OS X Mavericks 10.9.4 update?

    What is the file size of the OS X Mavericks 10.9.4 update? I have a limited 4G connection, so this information would be useful BEFORE downloading, as it could put me over my limit and incur additional cost.

  • Frozen BB Z10

    Hey guys, I have a question I was hoping you could answer regarding my Blackberry Z10.  A couple days ago my Z10 phone battery died as I was sitting watching a movie.  When I came back and put my phone in my charger, it showed the yellowish LED light

  • Hulu desktop on new mac mini

    I very recently upgraded my mac mini to the new "early 2009" edition and i'm quite satisfied with the power it delivers. however, since my mini is a media center, i used to enjoy hulu and boxee desktop for tv on demand. Over the last 4 days and short