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

    Join Date
    May 2000
    Posts
    2
    Rep Power
    0
    if i were to set up internet access to a mysql database with the mysql and jswdk on the !same! server, how would i set up the mysql host, user, and db tables?
    I have been having numerous troubles with doing this, mostly in the part that my java servlet returns the mysqlexception "server config denies access to data source"
    I figure this must be a problem with the way my access tables are set up.

    currently they are..
    under host
    there are localhost and machinename rows

    under user there is
    localhost ...root..password
    localhost ...eric..password

    under db there is
    % the_db_name ..user

    i cannot understand what is going wrong , i have been at this for so long..should there be something else under user/host, is it incorrectly set? Maybe an internet address, something.com? an IP address?
    thanks a million, eric

    Comments on this post

    • BaronVonDoppleG agrees
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    SLC, UT, USA
    Posts
    47
    Rep Power
    16
    "under user there is
    localhost ...root..password
    localhost ...eric..password"

    Try adding user "nobody" for localhost to this table and don't specify a password. This is the user id that runs the webserver. Of course I'm assuming you're using Apache. If not then find out what the webservers user name is and add that to the user table. There is also an excellent tutorial here at devshed on this in the mysql area.

    Robman

    Comments on this post

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

    Join Date
    Jun 2000
    Posts
    1
    Rep Power
    0
    Are you running on Redhat? If so, they ship a broken /etc/hosts with the following line in it:

    127.0.0.1 localhost.localdomain localhost

    This isn't standard, what it should be is
    127.0.0.1 localhost

    This would cause 127.0.0.1 to map to localhost.localdomain first, which is not correct.

    You could either change /etc/hosts, or change the user table to look like this:

    % ...root..password
    % ...eric..password

    which means MySQL won't care about what machine you are using to connect to the database.

    Comments on this post

    • BaronVonDoppleG agrees

IMN logo majestic logo threadwatch logo seochat tools logo