[case 45724] Unable to add user to database via cPanel DB wizard

renegadechef

Registered
Jan 3, 2011
3
0
51
Hello everyone :)

I'm having a problem adding users to my databases after the most recent cPanel release was automatically installed on my servers (dedicated boxes with Liquidweb).

I am simply trying to use the cPanel database creator wizard to create a new database and user and then add the user to the created DB.

The DB is being created fine, as I can see it in PHPMyAdmin and am able to import my SQL file there without a problem, yet for some reason, the user is not being added to the database, so my scripts are unable to interact with it! :(

I have seen in another thread (here: http://forums.cpanel.net/f42/cpanel-api-not-adding-created-user-created-database-182011.html) that this problem is not only affecting me, and seems also to be affecting the cPanel API, which btw I just realized existed (awesome!)

Anyway, I am wondering if anybody has a work around for this issue?

Thanks everyone :)
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
27
143
Houston, TX
cPanel Access Level
Root Administrator
Are you seeing any error messages when you try to add the user to the database? Try tail-ing the cPanel error log while you add a user. Run the following command from the shell as root:

Code:
# tail -f /usr/local/cpanel/logs/error_log
and try to add a user to a database via cPanel. Press Ctrl+C when you are finished to stop the tail command. Paste the results of the tail command into your reply.
 

renegadechef

Registered
Jan 3, 2011
3
0
51
Are you seeing any error messages when you try to add the user to the database? Try tail-ing the cPanel error log while you add a user. Run the following command from the shell as root:

Code:
# tail -f /usr/local/cpanel/logs/error_log
and try to add a user to a database via cPanel. Press Ctrl+C when you are finished to stop the tail command. Paste the results of the tail command into your reply.
Hey Jared, thanks for the quick response :)

Yes, I did get an error message within cPanel, in the DB wizard on step 4 of the process:

***** Pasted from the page ******

MySQL® Database Wizard
Step 4: Complete the task

User testdb was added to the database testdb.
You do not have access to that database (testdb)!

****************************

The same thing happens every time I try to create a database now, across all of my cPanel accounts/domains, well I have tested 3-4 of them with the same result, so I'm assuming all of them...

The good news is that I did find a simple solution! :) After using the MySQL Database Wizard, I can return to cPanel home and then click "MySQL Databases". In this section, I can see that the database I just created is there, as well as the user... but the user has not been added to the DB, although the Wizard just reported that it has.

So now I simply add the user to the DB from within this section of cPanel, instead of using the Wizard, and it works fine. :)

It would be really great to be able to use the wizard again though!!!!
 
Last edited:

mtindor

Well-Known Member
Sep 14, 2004
1,508
136
343
inside a catfish
cPanel Access Level
Root Administrator
Jared,

I'm running 11.28.60 and experience the same problem when using the wizard. After running the Wizard, it says:

Code:
User mttestu was added to the database mttest.
You do not have access to that database (mttest)!
tail of /usr/local/cpanel/logs/error_log reveals:

Code:
[2011-01-03 13:58:12 -0500] info [mysqladmin] Creating MySQL database bobsdom_mttest for user bobsdom
[2011-01-03 13:58:28 -0500] info [mysqladmin] Creating MySQL virtual user bobsdom_mttestu for user bobsdom
DBD::mysql::st execute failed: There is no such grant defined for user 'mttestu' on host 'localhost' at /usr/local/cpanel/Cpanel/Mysql.pm line 1166.
mysqladmin: You do not have access to that database (mttest)!
I opened a ticket regarding this at around 2:12 PM EST today in case you guys cannot reproduce this locally on your test servers and need access to a machine experiencing the problem.

Mike
 
Last edited:

Mozafary

Member
Sep 30, 2010
7
0
51
Same problem in WHM 11.28.60

Code:
[2011-01-04 08:18:33 +0000] info [mysqladmin] Creating MySQL database username_test for user username
[2011-01-04 08:18:41 +0000] info [mysqladmin] Creating MySQL virtual user username_is for user username
DBD::mysql::st execute failed: There is no such grant defined for user 'is' on host 'localhost' at /usr/local/cpanel/Cpanel/Mysql.pm line 1166.
mysqladmin: You do not have access to that database (test)!
 

akia

Member
Jun 3, 2010
7
0
51
Same for me. I've tried adding a user to the database manually but that dosn't work.

Can anyone tell me how to work around it.
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
Houston, TX
cPanel Access Level
Root Administrator
Hi All,

This should be resolved by internal case number 45724, which is resolved as of cPanel build 11.28.64. If this problem persists please post back here or open a support ticket.

Regards,
-DavidN
 

dlewis

Registered
Jan 6, 2011
1
0
51
We have that patch installed and it didn't fix the issue

Change Log for 11.28.64
Entry: 2011-01-05, 02:00 (UTC)
cPanel X3

* Fixed case 45724: The MySQL Database wizard erroneously attempts to use non-prefixed usernames
----------------------------

curl result: <result>You do not have access to that database (38538)!
</result>

I'm experiencing as mentioned above. Log into cpanel -> databases and user and db are there. just hit add and it works.
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
Houston, TX
cPanel Access Level
Root Administrator
Hi dlewis,

Are you sure that you're not encountering the issue in this other forum thread instead?

This thread here is about a problem with the DB wizard in the cPanel interface. The internal case 45724 shows that code corrections were for the interface pages and how they handled the form data (though there was also a backend correction, one that is not exposed via an API module/function).

In the error that you posted, I see "curl result" which leads me to believe that you using a remote API method, possibly our XML-API.

The thread I link to above is still an active case in Development and is concerned with the Mysql::adduserdb call; specifically the input parameters necessary for a successful action of the request. If that is the call you're making to receive that error, please follow or post on that thread. Otherwise I will need more detail as I don't follow how your error message correlates to this thread.

Best Regards,
-DavidN
 

skatebored

Member
Sep 3, 2007
24
0
51
Same problem in WHM 11.28.60

Code:
[2011-01-04 08:18:33 +0000] info [mysqladmin] Creating MySQL database username_test for user username
[2011-01-04 08:18:41 +0000] info [mysqladmin] Creating MySQL virtual user username_is for user username
DBD::mysql::st execute failed: There is no such grant defined for user 'is' on host 'localhost' at /usr/local/cpanel/Cpanel/Mysql.pm line 1166.
mysqladmin: You do not have access to that database (test)!
same problem down here on WHM 11.28.64 - CENTOS 5.5 x86_64 standard.
anyone please help...:confused:
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
Houston, TX
cPanel Access Level
Root Administrator
I'm getting the identical error, but with Fantastico, could there be any relation?
Then it's most likely a Fantastico issue. Last I looked, Fantastico doesn't always utilize the cPanel APIs. As well, I recall some other folks mentioning (when we released 11.28 to the CURRENT tier) that Fantastico was having issues with DB Mapping.

I suggest you open a bug report with Fantastico.

Regards,
-DavidN
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
Houston, TX
cPanel Access Level
Root Administrator
same problem down here on WHM 11.28.64 - CENTOS 5.5 x86_64 standard.
anyone please help...:confused:
This would be the first report of this issue on a build 11.28.64+. I'll have QA take a look. If you need immediate resolution, I suggest open a support ticket so our technicians can investigate. If you do open a ticket, make sure and reference this thread and PM the ticket ID.

Regards,
-DavidN