From: Jiho Han Date: March 31 1999 2:22am Subject: Help with Mysql and JDBC List-Archive: http://lists.mysql.com/mysql/1219 Message-Id: <370186EA.268B3D85@att.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B46B4937C1144900676E9A0D" --------------B46B4937C1144900676E9A0D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am using mm driver to connect to the MySQL Oh and mysqld is running on Windows NT machine. When I run mysql clients(dist) and also native admin clients, I don't seem to have any trouble connecting to the DB. What am I doing wrong? thanks The following is the connect statement: ---------------------------------------------------------------- conn = DriverManager.getConnection("jdbc:mysql://www.yourdomain.com:3306/" + db + "?user=pmill&password=welcome"); And the following is the error I get: ---------------------------------------------------------------- java.sql.SQLException: Server configuration denies access to data source at org.gjt.mm.mysql.MysqlIO.init(Compiled Code) at org.gjt.mm.mysql.Connection.(Connection.java:229) at org.gjt.mm.mysql.Driver.connect(Driver.java:126) at java.sql.DriverManager.getConnection(Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java:141) at DBConnectionManager.openConnection(DBConnectionManager.java:50) at DBManager$MenuListener.actionPerformed(Compiled Code) at java.awt.MenuItem.processActionEvent(MenuItem.java:435) at java.awt.MenuItem.processEvent(MenuItem.java:399) at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:190) at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:182) at java.awt.EventDispatchThread.run(Compiled Code) And the following is the dump from mysql table: ---------------------------------------------------------------- # MySQL dump 5.10 # # Host: localhost Database: mysql #-------------------------------------------------------- # Server version 3.21.29a-gamma-debug # # Table structure for table 'db' # CREATE TABLE db ( Host char(60) DEFAULT '' NOT NULL, Db char(64) DEFAULT '' NOT NULL, User char(16) DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, UNIQUE Host (Host,Db,User), KEY User (User) ); # # Dumping data for table 'db' # INSERT INTO db VALUES ('%','test%','','Y','Y','Y','Y','Y','Y'); # # Table structure for table 'host' # CREATE TABLE host ( Host char(60) DEFAULT '' NOT NULL, Db char(64) DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, UNIQUE Host (Host,Db) ); # # Dumping data for table 'host' # # # Table structure for table 'user' # CREATE TABLE user ( Host char(60) DEFAULT '' NOT NULL, User char(16) DEFAULT '' NOT NULL, Password char(16) DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') DEFAULT 'N' NOT NULL, File_priv enum('N','Y') DEFAULT 'N' NOT NULL, UNIQUE Host (Host,User) ); # # Dumping data for table 'user' # INSERT INTO user VALUES ('localhost','root','7f84fb80289fb831','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); INSERT INTO user VALUES ('geosphere.mt.att.com','pmill','4326ef3a2d0d0116','Y','N','N','N','N','N','N','N','N','N'); INSERT INTO user VALUES ('uncia.mt.att.com','pmill','4326ef3a2d0d0116','Y','N','N','N','N','N','N','N','N','N'); INSERT INTO user VALUES ('geosphere.mt.att.com','root','7f84fb80289fb831','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); -- "The biggest mistake people make in their life seems to me is that they take everything for granted, thinking that things are going to be there tomorrow since they were here yesterday and today... But you and I both know that's not always the case..." - anonymous ---------------------------------------------------------------- Jiho Han hanj@stripped AT&T WorldNet Service Customer Care Application Development 200 Laurel Ave. Middletown, NJ 07748 MT C2-3A37 (732)420-1885 ---------------------------------------------------------------- --------------B46B4937C1144900676E9A0D Content-Type: text/plain; charset=us-ascii; name="dump" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dump" # MySQL dump 5.10 # # Host: localhost Database: mysql #-------------------------------------------------------- # Server version 3.21.29a-gamma-debug # # Table structure for table 'db' # CREATE TABLE db ( Host char(60) DEFAULT '' NOT NULL, Db char(64) DEFAULT '' NOT NULL, User char(16) DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, UNIQUE Host (Host,Db,User), KEY User (User) ); # # Dumping data for table 'db' # INSERT INTO db VALUES ('%','test%','','Y','Y','Y','Y','Y','Y'); # # Table structure for table 'host' # CREATE TABLE host ( Host char(60) DEFAULT '' NOT NULL, Db char(64) DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, UNIQUE Host (Host,Db) ); # # Dumping data for table 'host' # # # Table structure for table 'user' # CREATE TABLE user ( Host char(60) DEFAULT '' NOT NULL, User char(16) DEFAULT '' NOT NULL, Password char(16) DEFAULT '' NOT NULL, Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') DEFAULT 'N' NOT NULL, File_priv enum('N','Y') DEFAULT 'N' NOT NULL, UNIQUE Host (Host,User) ); # # Dumping data for table 'user' # INSERT INTO user VALUES ('localhost','root','7f84fb80289fb831','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); INSERT INTO user VALUES ('geosphere.mt.att.com','pmill','4326ef3a2d0d0116','Y','N','N','N','N','N','N','N','N','N'); INSERT INTO user VALUES ('uncia.mt.att.com','pmill','4326ef3a2d0d0116','Y','N','N','N','N','N','N','N','N','N'); INSERT INTO user VALUES ('geosphere.mt.att.com','root','7f84fb80289fb831','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); --------------B46B4937C1144900676E9A0D--