The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

postwwwacct Auto-create DB, DB User, Grant Access

Discussion in 'General Discussion' started by CreedFeed, Aug 27, 2007.

  1. CreedFeed

    CreedFeed Member

    Joined:
    Jan 22, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I've created a postwwwacct script in PHP to auto create a database, database user, and grant access to the database for that user. It's not working, however it seems to be inserting all the correct data into the 'mysql' table. When I load my website after creating an account I get an error 'Unable to connect to database, User does not have privileges' error.

    After the account is created and I log into the account's CPanel, all the correct data is displayed - the user was created, the db was created and the user was granted access to the database. When I click on the username to view the permissions it was granted, everything is checked.

    If I click on the "Update" button from the Manage User Privileges page, everything seems to work then. However after doing that all the data in the 'mysql' database table seem to remain the same.

    Any idea what I'm missing? Is there something other than the 'db' table in the 'mysql' database that I have to specify grant access privileges?
     
  2. CreedFeed

    CreedFeed Member

    Joined:
    Jan 22, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I solved my problem - after assigning privileges I had to flush the mysql privileges!
     
Loading...

Share This Page