How to know if a mysql user has all (or some) privileges on a certain DB?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
How to know if a mysql user has all (or some) privileges on a certain DB?
Of course, I don't ask how to do so with phpmyadmin, rather, with the mysql CLI.
I aim to gather as much as basic data on a certain user but the most important for me is to understand the degree this user is associated with the given database (which has the exact same name as the user name, in this case - both the user and the db, are called test
).
Edit for PuzzledCuber:
That's my output for show grants for 'test'@'%';
:
+--------------------------------------------------------+
| Grants for test@localhost |
+--------------------------------------------------------+
| GRANT USAGE ON *.* TO 'test'@'localhost' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'localhost' |
+--------------------------------------------------------+
Why is the second row (GRANT ALL...) different than the first row (GRANT USAGE...)?
mysql privileges
add a comment |Â
up vote
1
down vote
favorite
How to know if a mysql user has all (or some) privileges on a certain DB?
Of course, I don't ask how to do so with phpmyadmin, rather, with the mysql CLI.
I aim to gather as much as basic data on a certain user but the most important for me is to understand the degree this user is associated with the given database (which has the exact same name as the user name, in this case - both the user and the db, are called test
).
Edit for PuzzledCuber:
That's my output for show grants for 'test'@'%';
:
+--------------------------------------------------------+
| Grants for test@localhost |
+--------------------------------------------------------+
| GRANT USAGE ON *.* TO 'test'@'localhost' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'localhost' |
+--------------------------------------------------------+
Why is the second row (GRANT ALL...) different than the first row (GRANT USAGE...)?
mysql privileges
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
How to know if a mysql user has all (or some) privileges on a certain DB?
Of course, I don't ask how to do so with phpmyadmin, rather, with the mysql CLI.
I aim to gather as much as basic data on a certain user but the most important for me is to understand the degree this user is associated with the given database (which has the exact same name as the user name, in this case - both the user and the db, are called test
).
Edit for PuzzledCuber:
That's my output for show grants for 'test'@'%';
:
+--------------------------------------------------------+
| Grants for test@localhost |
+--------------------------------------------------------+
| GRANT USAGE ON *.* TO 'test'@'localhost' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'localhost' |
+--------------------------------------------------------+
Why is the second row (GRANT ALL...) different than the first row (GRANT USAGE...)?
mysql privileges
How to know if a mysql user has all (or some) privileges on a certain DB?
Of course, I don't ask how to do so with phpmyadmin, rather, with the mysql CLI.
I aim to gather as much as basic data on a certain user but the most important for me is to understand the degree this user is associated with the given database (which has the exact same name as the user name, in this case - both the user and the db, are called test
).
Edit for PuzzledCuber:
That's my output for show grants for 'test'@'%';
:
+--------------------------------------------------------+
| Grants for test@localhost |
+--------------------------------------------------------+
| GRANT USAGE ON *.* TO 'test'@'localhost' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'localhost' |
+--------------------------------------------------------+
Why is the second row (GRANT ALL...) different than the first row (GRANT USAGE...)?
mysql privileges
edited Nov 19 '17 at 7:40
asked Nov 17 '17 at 18:48
Arcticooling
83123
83123
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
>show grants for 'user'@'%';
Thie explains how to check users and their privileges:
http://xmodulo.com/how-to-view-list-of-mysql-users-and-their-privileges.html
This shows the different permission types and how to grant them:
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
Hope this helps!
PuzzeledCuber, deep thanks. Just one more thing, please see my update in the question.
â Arcticooling
Nov 19 '17 at 7:41
This is because the user existed with no priviledges when you first made it stackoverflow.com/questions/2126225/â¦
â PuzzledCuber
Nov 20 '17 at 0:16
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
>show grants for 'user'@'%';
Thie explains how to check users and their privileges:
http://xmodulo.com/how-to-view-list-of-mysql-users-and-their-privileges.html
This shows the different permission types and how to grant them:
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
Hope this helps!
PuzzeledCuber, deep thanks. Just one more thing, please see my update in the question.
â Arcticooling
Nov 19 '17 at 7:41
This is because the user existed with no priviledges when you first made it stackoverflow.com/questions/2126225/â¦
â PuzzledCuber
Nov 20 '17 at 0:16
add a comment |Â
up vote
1
down vote
accepted
>show grants for 'user'@'%';
Thie explains how to check users and their privileges:
http://xmodulo.com/how-to-view-list-of-mysql-users-and-their-privileges.html
This shows the different permission types and how to grant them:
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
Hope this helps!
PuzzeledCuber, deep thanks. Just one more thing, please see my update in the question.
â Arcticooling
Nov 19 '17 at 7:41
This is because the user existed with no priviledges when you first made it stackoverflow.com/questions/2126225/â¦
â PuzzledCuber
Nov 20 '17 at 0:16
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
>show grants for 'user'@'%';
Thie explains how to check users and their privileges:
http://xmodulo.com/how-to-view-list-of-mysql-users-and-their-privileges.html
This shows the different permission types and how to grant them:
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
Hope this helps!
>show grants for 'user'@'%';
Thie explains how to check users and their privileges:
http://xmodulo.com/how-to-view-list-of-mysql-users-and-their-privileges.html
This shows the different permission types and how to grant them:
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
Hope this helps!
answered Nov 17 '17 at 19:06
PuzzledCuber
938
938
PuzzeledCuber, deep thanks. Just one more thing, please see my update in the question.
â Arcticooling
Nov 19 '17 at 7:41
This is because the user existed with no priviledges when you first made it stackoverflow.com/questions/2126225/â¦
â PuzzledCuber
Nov 20 '17 at 0:16
add a comment |Â
PuzzeledCuber, deep thanks. Just one more thing, please see my update in the question.
â Arcticooling
Nov 19 '17 at 7:41
This is because the user existed with no priviledges when you first made it stackoverflow.com/questions/2126225/â¦
â PuzzledCuber
Nov 20 '17 at 0:16
PuzzeledCuber, deep thanks. Just one more thing, please see my update in the question.
â Arcticooling
Nov 19 '17 at 7:41
PuzzeledCuber, deep thanks. Just one more thing, please see my update in the question.
â Arcticooling
Nov 19 '17 at 7:41
This is because the user existed with no priviledges when you first made it stackoverflow.com/questions/2126225/â¦
â PuzzledCuber
Nov 20 '17 at 0:16
This is because the user existed with no priviledges when you first made it stackoverflow.com/questions/2126225/â¦
â PuzzledCuber
Nov 20 '17 at 0:16
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405322%2fhow-to-know-if-a-mysql-user-has-all-or-some-privileges-on-a-certain-db%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password