Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

MySQL Permission 'Select Only'

Posted on 2012-09-17
3
Medium Priority
?
434 Views
Last Modified: 2012-09-18
I have a situation where I would like for someone to be able to connect to a database and issue a query to select data only. Nothing else.
I'm assuming, for example when using c-Panel, that this is accomplished by simply choosing 'select' under user permissions for the db.

But would I need to provide any other permission other than 'select'?

Here are the choices available in the c-Panel MySQL user permissions:
ALTER
CREATE
CREATE ROUTINE
CREATE TEMPORARY TABLES
CREATE VIEW
DELETE
DROP
EXECUTE
INDEX
INSERT
LOCK TABLES
REFERENCES
SELECT
SHOW VIEW
UPDATE

Obviously I don't want to permit any 'create', 'drop', 'delete', 'insert' or 'update', but what about Index, Lock Tables, Execute and References.

Would it be necessary to grant any of these to perform a simple select query against the db?

Thanks!
0
Comment
Question by:formadmirer
3 Comments
 
LVL 81

Accepted Solution

by:
arnold earned 900 total points
ID: 38408415
How is the user will be connecting/executing their selects.

Which database engine is in use.
For select only, you would grant only the select right.
On a read there is no need to lock tables.
Indexes grants rights to add/delete indexes.
Etc.. Info at http://dev.mysql.com/doc/refman/5.1/en/grant.html#grant-privileges
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 600 total points
ID: 38408965
You might want to grant permission to create temporary tables and views.  As I understand your question, you want to allow this "someone" to inspect and copy, but not modify, your data.
0
 

Author Closing Comment

by:formadmirer
ID: 38409607
I conducted some tests and found that I only need to allow select. I appreciate your replies - thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question