I have a user (user1) for a certain database (db1). I need this user to be able to create and remove other users for the SAME database (db1).
I have this working, but I had to grant GLOBAL privs using PHPMyAdmin as root, which I am sure I should not have to do, because that grants this user access to ALL other databases, which I would prefer not to do. I am sure something must be wrong.
I would expect to ONLY have to grant this user privs on his own database (db1) and on the mysql database (where the user tables are), with GRANT privs. However it fails unless I ALSO grant ALL global privs as well.
I am using a perl script to do the account creation with an SQL statement like this...
GRANT SELECT ON db1.* TO 'user2'@'localhost' IDENTIFIED BY 'password'
and for removal again
DROP USER 'user2'@'localhost'
MySQL Version 4.1.21
PHPMyAdmin version 2.8.2.4
Anyone suggest what I might be missing?
I have this working, but I had to grant GLOBAL privs using PHPMyAdmin as root, which I am sure I should not have to do, because that grants this user access to ALL other databases, which I would prefer not to do. I am sure something must be wrong.
I would expect to ONLY have to grant this user privs on his own database (db1) and on the mysql database (where the user tables are), with GRANT privs. However it fails unless I ALSO grant ALL global privs as well.
I am using a perl script to do the account creation with an SQL statement like this...
GRANT SELECT ON db1.* TO 'user2'@'localhost' IDENTIFIED BY 'password'
and for removal again
DROP USER 'user2'@'localhost'
MySQL Version 4.1.21
PHPMyAdmin version 2.8.2.4
Anyone suggest what I might be missing?