SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: MySQL users

  1. #1
    SitePoint Member
    Join Date
    May 2002
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question MySQL users

    Hello,

    I am currently working on a RackShack server and I am trying to set up users for MySQL access. As far as I understand, there are three tables that are automatically created (db, user, host).

    I created a database called sylin_com with complete permissions in the db table along with 3 users with complete permissions in the user table and added a entry in the host table as.

    TABLE HOST
    Host | Db | Select_priv |...
    ------------------------------------------
    localhost | stylin_com | Y |...

    TABLE USER
    Host | User | Password | Select_priv |...
    ------------------------------------------
    localhost | admin | xxx | Y |...
    localhost | kmedi | xxx | Y |...
    localhost | kim | xxx | Y |...

    TABLE DB
    Host | Db | User | Select_priv |...
    ------------------------------------------
    localhost | stylin_com | admin | Y |...
    localhost | stylin_com | kmedi | Y |...
    localhost | stylin_com | kim | Y |...

    Currently, I am only able to connect through root. And from there I can CREATE, SELECT, etc. I can't even connect using the other users.

    - The snipit I use to connect is:

    $link=mysql_pconnect($hostname, $username, $password) or die("<BR>Couldn't Connect using $hostname, $username<BR>");

    - Error received:

    Warning: Access denied for user: 'admin@localhost' (Using password: YES) in /home/sites/site2/web/myadmin/guru.html on line 40

    - I have tried deleting the users
    - Using the same password as root
    - Creating other tables

    Is there some kind of permissions outside mysql that you must set, or a perticular order in which databases and users should be created?
    Michael Batchedler
    (802) 467-1263

  2. #2
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Recommend looking at this article - explains MySQL user admin nicely.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •