#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    1
    Rep Power
    0
    i have installed jserv module on my unix server with virtual BSD flavour.the servlets are running fine there. now i want to connect mysql database to the servlets.i have installed the mm mysql driver at /usr/local/jdk1.1.8 and set the classpath.
    But it was not working the ..mm.mysql.Driver class was not found. then i put all the org.gjt... class package to the /sr/etc/httpd/servlets directory ,
    now my servlet could find the mm.mysql.Driver class but the connection is not made with the server.
    the connection string i have passed is
    "jdbc:mysql://myhost(localhost):3306/databasename?user=username&password=pass"; i have created a seperate user and permitted all the access to him in the mysql user database.

    i have tried all the option in the connection string but i am still getting the error message
    -------------------------------------
    java.sql.SQLException: Server configuration denies access to data source

    Connection null Exception is here java.lang.NullPointerException
    ------------------------------------------

  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    8
    Rep Power
    0
    Hi,

    Firstly make sure you have added the mysql driver to your classpath, and then make sure you have given the mysql user you created access from localhost. If you have done these then ignore this

    plato
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by ajay:
    i have installed jserv module on my unix server with virtual BSD flavour.the servlets are running fine there. now i want to connect mysql database to the servlets.i have installed the mm mysql driver at /usr/local/jdk1.1.8 and set the classpath.
    But it was not working the ..mm.mysql.Driver class was not found. then i put all the org.gjt... class package to the /sr/etc/httpd/servlets directory ,
    now my servlet could find the mm.mysql.Driver class but the connection is not made with the server.
    the connection string i have passed is
    "jdbc:mysql://myhost(localhost):3306/databasename?user=username&password=pass"; i have created a seperate user and permitted all the access to him in the mysql user database.

    i have tried all the option in the connection string but i am still getting the error message
    [/quote]

  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    6
    Rep Power
    0
    i am also facing the same problem and the error i am getting is unauthorised access to user@localhost. Now i'll try to run it on remote server and then will see whether it works or not.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    SLC, UT, USA
    Posts
    47
    Rep Power
    16
    Try taking the "username=" and "password=" out of the string and just use the actual users name (and password if necessary). I had done the same thing and this fixed it for me.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    6
    Rep Power
    0
    Finally my problem is fixed. I made a newuser in MySQL and granted him all the priviliges. But there is one thing, the password must be of eight characters else java program is giving unauthorized access exception.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    0
    Rep Power
    0
    I've got the same problem. I've installed JServ, JDBC v 1.2b, and MySQL 3.22.32 running on Linux. When I try to connect do my DataBase i get following exception:
    Server configuration denies access to data source
    When I try to connect to the same DB (same tables) but running on NT it works fine.

IMN logo majestic logo threadwatch logo seochat tools logo