Alexander Bird
Alexander Bird

Reputation: 40639

mysql cli: how to list all databases I have permisions to create/read/update/delete?

What command do I use on a mysql command line to see all the databases on some database server that I have permissions to? Specifically I am looking for the DBs that I have full CRUD permissions to.

Upvotes: 3

Views: 634

Answers (1)

AJ.
AJ.

Reputation: 28174

mysql -e "show databases"


UPDATE:

Based on your edit, here is a query you can run against the mysql database in your server:

mysql> select Db from db where User='aj' and (select_priv='Y' and insert_priv='Y' and update_priv='Y' and delete_priv='Y');
+---------+
| Db      |
+---------+
| HopeDB  |
| LocusDB |
+---------+
2 rows in set (0.00 sec)

Upvotes: 2

Related Questions