PDA

View Full Version : New database users created by Cpanel don't have correct permissions


fury
Mon 30th Jun '03, 2:55am
OK, the situation. I've got a WHM-created hosting account, and all is well, except new database users created by the Cpanel do not have LOCK TABLE/UNLOCK TABLE permissions (which of course are needed for importing mysqldumps)

What do I look for to fix this? (i.e. how can I fix the current account so that the correct permissions are given, and how can I fix WHM/Cpanel so that new users have hte correct permissions)

I do not have root access to the server, BTW.

[hmm? why is this saying this is a duplicate thread?]

Steve Machol
Mon 30th Jun '03, 3:18am
You need root access to fix this.

Also to grant privileges you need to explicitly grant them. SSH in as root and start the 'mysql' command-line client. (Just type 'mysql'.) Then issue the following command:

GRANT SELECT,LOCK TABLES ON dbname.* TO username IDENTIFIED BY PASSWORD 'password';

Issue this command, supplying the dbname and username, for each user/database combo that you want to give LOCK privs to. Once that is done issue the following command to apply the changes:

FLUSH PRIVILEGES;

For more information go here: http://www.mysql.com/doc/en/GRANT.html

fury
Mon 30th Jun '03, 3:27am
Thanks, Steve. :) Is there any way to set this up so that Cpanel automatically does this for new database users? It worked like that with my old hosting account.

Steve Machol
Mon 30th Jun '03, 2:39pm
That I don't know. Sorry.