Ok, I m trying to add a user to a MySQL database. This user should be able to add other users to the database it has privileges for. So I did this:
GRANT ALL privileges ON thedbname.* TO topuser @ % IDENTIFIED BY pass ;
However, I this user cannot add users. Is that because I only gave them all for a single database? The permissions show up as N when I view them whereas if I remove the database name they show as Y .
I want topuser to be able to run this:
GRANT SELECT ON thedbname.* TO seconduser @ % IDENTIFIED BY pass ;
They do not need to add users to other databases, hence my attempts here.
This is for a web app where users provide a username and password to access a database so that a password is not stored in the code. Other solutions welcomed though!