Hey folks -

Here is hoping someone can help & once I get it down I promise I'll post all
my work on this list so some other newbie can benefit.

I'm simply trying to run a very very straightforward JDBC test with mySQL &
I keep getting the "Server configuration denies access to data source"
error.  But before you tell me that I must simply look at what my mysql.db &
mysql.user table allows - I'VE TRIED THAT.  I realize that the error is
probably there somewhere - but I can't see it.

I've tried connecting with 2 different accounts - the provided "root" & a
user I created "deep"  to 2 different databases the provided "test" &
"testdb" which I created) .  Here is what mysql says about the two different
databases

mysql> select * from db;
Host  | Db         | User |.......
-----+------------+-------
| %         | test    |       | ......
| %         | test\_% |     | ........
| localhost | testdb  | deep |........


Note that "root" should have access to "test" & deep@localhost should have
access to "testdb" right?

So here are all the connection strings I have tried - all return the same
error below
        Connection conn = DriverManager.getConnection(
            "jdbc:mysql://localhost:3306/test", "root", "mypass"
//            "jdbc:mysql://localhost:3306/testdb", "deep", "mypass"
//            "jdbc:mysql://localhost/testdb?user=deep&password=mypass"
//            "jdbc:mysql://localhost/testdb", "deep", "mypass"
//            
"jdbc:mysql://localhost:3306/testdb?user=deep@localhost&password=mypass"
//            "jdbc:mysql://localhost:3306/testdb?user=deep&password=mypass"
//            "jdbc:mysql://localhost/testdb", "deep@localhost", "mypass"
//            "jdbc:mysql:///test", "root", "mypass"
//            "jdbc:mysql://localhost/test", "root@localhost", "mypass"
);


My Error:

Exception in thread "main" java.sql.SQLException: Server configuration
denies access to data source
        at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:193)
        at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
        at 
org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
        at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
        at java.sql.DriverManager.getConnection(DriverManager.java:517)
        at java.sql.DriverManager.getConnection(DriverManager.java:199)
        at TestMySQL4.main(TestMySQL4.java:76)


BTW: 
I am using MacOS 10.1
MySQL 3.23.42
The driver is: mm.mysql-2.0.6.jar

Please help!

'deep








----------------------------------
Amandeep Jawa
Worker Bee Software
----------------------------------
[EMAIL PROTECTED]
225A Dolores St.
San Francisco, CA 94103-2202

Home: 415 255 6257 (ALL MALP)

professional: http://www.worker-bee.com
personal: http://www.deeptrouble.com
political: http://www.sflcv.org





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to