postwwwacct Auto-create DB, DB User, Grant Access


Jan 22, 2004
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?