Is it possible to delete all databases that were created by a specific user?

Is it possible to delete all databases that were created by a specific user?

Answers


Looking at MySQL's DELETE DATABASE syntax, it seems impossible via MySQL itself. However, you could use 3rd party application that queries:

SELECT db FROM mysql.db WHERE user = "<user>"

to get a list of user's databases, then loop over the result to query delete database above.


Need Your Help

How to use header authentication with DataZen?

http authentication dashboard datazen-server

We are using DataZen to visualize some data via dashboards.

View pdf file in browser instead of downloading

php codeigniter fpdf

header("Content-Length: " . filesize ('theme/assets/pdf/ci.pdf' ) );