Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Posts
    83

    Thumbs up Unanswered: MySQL connection

    I have installed MySQL in my machine which is in LINUX .
    I am able to connect to MySQL from command line in my machine .

    When i tried to connect MySQL from any other applications like DataStudio,DBVisualizer etc it is throwing the following error

    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection refused

    PHP Code:
    STACKTRACE:

    java.net.SocketExceptionjava.net.ConnectExceptionConnection refused
            at com
    .mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
            
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
            
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
            
    at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
            
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
            
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
            
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
            
    at NMFL.zk.e(Unknown Source
    I have disabled the firewall in my machine by stopping the IPTABLES using command
    /etc/init.d/iptables stop

    Kindly suggest me what to do

  2. #2
    Join Date
    Oct 2006
    Posts
    83
    Some more Info..

    When i telnet to the MySQL (telnet localhost 3306)port the below error is thrown
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    telnet: Unable to connect to remote host: Connection refused

  3. #3
    Join Date
    May 2007
    Posts
    8
    Hi,

    Please check configuration file My.cnf, if you have skip_networking in it.
    Also check for current user privileges or create new user with all privileges.

    Thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •