开发者

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

开发者 https://www.devze.com 2022-12-19 12:04 出处:网络
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 pe

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.


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号