List:MySQL and Java« Previous MessageNext Message »
From:Liqiu.Tan Date:March 14 2003 1:52am
Subject:help for my jdbc connection problem
View as plain text  
Hi,

My system is Redhat 8.0 + Java 1.4.0.3 + Mysql 3.23.55.
My /etc/hosts file is :
"127.0.0.1       localhost       localhost
 192.168.0.14    hy
"
also ,192.168.0.14 is the ip address of localhost.

if my connection  url is  "jdbc:mysql://192.168.0.14:3306/data"  it works
fine.
if my connection  changed to "jdbc:mysql://localhost:3306/data" or
"jdbc:mysql://127.0.0.1:3306/data" , it throws the following error:
"
java.sql.SQLException: Server configuration denies access to data source
        at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
        at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
        at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source)
        at org.gjt.mm.mysql.Driver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at JdbcTest24.main(JdbcTest24.java:11)
"

What is my problem?  Thanks.


Tan Liqiu







Thread
help for my jdbc connection problemLiqiu.Tan14 Mar
  • Re: help for my jdbc connection problemJeff Newmiller14 Mar
    • help for my jdbc connectionShivani17 Mar
      • Re: help for my jdbc connectionMax Morawski17 Mar
  • Re: help for my jdbc connection problemPål Arne Hoff14 Mar