-1

I am aware of how to grant a user access to only one database using phpMyAdmin, and I am aware of how to give a user access to create a new database using phpMyAdmin (using the Create privilege).

However, granting the Create privilege to a user also allows them to see all databases. Is there a way to allow users to create databases, but only view the databases that they have created?

I realise that this can be done with actual PHP / MySQL queries when creating the database (i.e. GRANT, also see here), however can it be done using only the phpMyAdmin interface (thus I also don't want answers involving a different interface)?

1 Answers1

0

The CREATE privilege needs to be able to determine if a MySQL database name already exists or not, before a new database can be created, as you can't have two different databases with the same name.

So read access to list/enumerate all databases is a requirement.

From a user experience point of view I am sure you could patch phpMyAdmin to only list the database a user has access to, but then you'll get enquiries why they can't create a new database <name> since it clearly doesn't exist yet but the create fails with a "database already exists error".
So that sounds like a Bad Idea™ to me...

HBruijn
  • 77,029
  • 24
  • 135
  • 201