Hi,

I have trouble with the JDBC connection. The error message I get is:

E2008 Error receiving initial from server.
E2028 Error in connection packet 1130 Host '%-.64s' is not allowed to
connect to
 this MySQL server
        at twz1.jdbc.mysql.jdbcMysqlBase.errMessage(jdbcMysqlBase.java)
        at
twz1.jdbc.mysql.jdbcMysqlConnex.errHandlerM(jdbcMysqlConnex.java)
        at twz1.jdbc.mysql.jdbcMysqlConnex.xOpen(jdbcMysqlConnex.java)
        at twz1.jdbc.mysql.jdbcMysqlConnex.<init>(jdbcMysqlConnex.java)
        at twz1.jdbc.mysql.jdbcMysqlDriver.connect(jdbcMysqlDriver.java)
        at java.sql.DriverManager.getConnection(DriverManager.java:91)
        at setupTable.Connect(setupTable.java:60)
        at setupTable.<clinit>(setupTable.java:15)          
line 15 is:
static java.sql.Connection con = Connect("DBname","UserName","Passwd");   

line 60 is: (a prototype of a class that I write)
static public Connection Connect(String database, String uid, String pas
sword)  

The driver that I'm using is: twz1.jdbc.mysql.jdbcMysqlDriver
The mysql database server is SunOS


Can anybody give a *simple* java code for this connection?

Thanks in advance.

--Haiying
-----------------------------------------------------------
Send a mail to [EMAIL PROTECTED] with
unsubscribe mysql [EMAIL PROTECTED]
in the body of the message to unsubscribe from this list.

Reply via email to