Created
August 31, 2017 07:43
-
-
Save CMCDragonkai/2fd83f106d0dfcae17d9653935602486 to your computer and use it in GitHub Desktop.
Getting CURRENT_USER's privileges in MySQL #mysql #sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM mysql.user | |
WHERE | |
`User` = SUBSTRING_INDEX(CURRENT_USER(), '@', 1) AND | |
`Host` = SUBSTRING_INDEX(CURRENT_USER(), '@', -1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment