WebFaction
Community site: login faq

Hi

I have just created a private instance of MySQL and I have created 2 users for it.

I would like that one user can read data in phpmyadmin but not edit it in any way while the other user has full privileges. Is this possible?

At the moment both users I have created have full permissions. I have tried the revoke command from the command line but it doesn't seem to have worked.

Thanks

asked 16 May '14, 12:03

jollinski
112
accept rate: 0%


You have full control of privileges with a private MySQL server.

The complete MySQL privilege documentation may be found here.

Can you show us which commands you have ran, changing the actual usernames/passwords so we can see if they are correct?

What does SHOW GRANTS for those users show?

permanent link

answered 16 May '14, 23:14

johns ♦♦
5.1k211
accept rate: 22%

Does this command return anything,

SHOW GRANTS FOR 'bv_research'@'localhost';
(17 May '14, 23:12) johns ♦♦

The result is

GRANT USAGE ON *.* TO 'bv_research'@'localhost'
(17 May '14, 23:20) jollinski

What happens if you try to GRANT specific privilege to the user, such as SELECT

GRANT SELECT ON *.* TO 'bv_research'@'localhost';

What happens if your REVOKE using this statement,

REVOKE ALL PRIVILEGES, GRANT OPTION FROM bv_research;
(18 May '14, 05:04) johns ♦♦

When I run SHOW GRANTS I get the following

-> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*passwordHashHere' WITH GRANT OPTION 
-> GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION

The commands I ran were as follows:

CREATE USER 'bv_research' IDENTIFIED BY 'my password';

I then tried using the following command to revoke permissions.

REVOKE ALL ON bv_users.* FROM 'bv_research'@'localhost';

Thanks for getting back to me. I'm by no means a dab hand at this.

permanent link

answered 17 May '14, 01:39

jollinski
112
accept rate: 0%

edited 18 May '14, 01:43

ryans ♦♦
5.0k73058

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168
×23
×12

question asked: 16 May '14, 12:03

question was seen: 1,616 times

last updated: 18 May '14, 05:04

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM