Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What databases do I have permissions on

How can I find what databases I have a minimum of read access to in either basic SQL, MySQL specific or in PHP?

like image 393
UnkwnTech Avatar asked Sep 15 '08 15:09

UnkwnTech


People also ask

How do I check permissions on a database?

Open the object explorer window and navigate to your object whose permissions you want to manage under your database. Right click on the object and click on Properties. In the Properties dialog box, navigate to the Permissions tab. Click on Search to find and select a user to which you want to assign the permission.

How do I see all my databases?

To view a list of databases on an instance of SQL Server. In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance. To see a list of all databases on the instance, expand Databases.

What are database permissions?

Permissions are the types of access granted to specific securables. At the server level, permissions are assigned to SQL Server logins and server roles. At the database level, they are assigned to database users and database roles.


1 Answers

There is a command in MySQL which can show you all of the permissions you have. The command is:

SHOW GRANTS;

It will give you output similar to:

root@(none)~> show grants;
+---------------------------------------------------------------------+
| Grants for root@localhost                                           |
+---------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION | 
+---------------------------------------------------------------------+
1 row in set (0.00 sec)

This is documented at in the manual here.

like image 65
Harrison Fisk Avatar answered Sep 30 '22 23:09

Harrison Fisk