From 47fd7c90f49c7af42d695face0a7327a2f73c9f9 Mon Sep 17 00:00:00 2001 From: bmaca Date: Tue, 22 Sep 2015 01:42:40 -0500 Subject: [PATCH] Added one more MySql cheat --- cheat/cheatsheets/mysql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cheat/cheatsheets/mysql b/cheat/cheatsheets/mysql index 610d395..83b5add 100644 --- a/cheat/cheatsheets/mysql +++ b/cheat/cheatsheets/mysql @@ -12,3 +12,8 @@ CREATE DATABASE owa CHARACTER SET utf8 COLLATE utf8_general_ci; # To add a user and give rights on the given database GRANT ALL PRIVILEGES ON database.* TO 'user'@'localhost'IDENTIFIED BY 'password' WITH GRANT OPTION; + +# To list the privileges granted to the account that you are using to connect to the server. Any of the 3 statements will work. +SHOW GRANTS FOR CURRENT_USER(); +SHOW GRANTS; +SHOW GRANTS FOR CURRENT_USER;