dbTalk Databases Forums  

DROP TABLE customers

comp.databases.mysql comp.databases.mysql


Discuss DROP TABLE customers in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Sherman Pendley
 
Posts: n/a

Default Re: DROP TABLE customers - 05-09-2008 , 12:59 PM






Rik Wasmus <luiheidsgoeroe (AT) hotmail (DOT) com> writes:

Quote:
Ignoramus26246 wrote:
I would like to know if Perl's DBI supports an attribute that would
make a database handle read only.

That is, I am looking for a way to make a handle read only so that all
subsequent queries that seek to modify the database, would not proceed
at all.

This would be for mysql.

A better way would be to make a user with only select priviliges, and
no insert/update/drop privilige.
An even tighter method, if you're using a version of MySQL that supports
stored procedures, is to use them to define an API for access to your data.
Then you can give a user permission to execute your API procedures, and no
low-level access at all.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


Reply With Quote
  #12  
Old   
cartercc
 
Posts: n/a

Default Re: DROP TABLE customers - 05-09-2008 , 01:25 PM






On May 9, 11:11 am, Ignoramus26246 <ignoramus26... (AT) NOSPAM (DOT)
26246.invalid> wrote:
Quote:
I would like to know if Perl's DBI supports an attribute that would
make a database handle read only.
mysql> GRANT SELECT ON database.* TO 'webuser'@'localhost' IDENDIFIED
BY 'webuserpassword';

Then, use webuser as your user for your application.

CC


Reply With Quote
  #13  
Old   
Rik Wasmus
 
Posts: n/a

Default Re: DROP TABLE customers - 05-10-2008 , 12:17 AM



On Fri, 09 May 2008 19:59:35 +0200, Sherman Pendley <spamtrap (AT) dot-app (DOT) org>
wrote:

Quote:
Rik Wasmus <luiheidsgoeroe (AT) hotmail (DOT) com> writes:

Ignoramus26246 wrote:
I would like to know if Perl's DBI supports an attribute that would
make a database handle read only.

That is, I am looking for a way to make a handle read only so that all
subsequent queries that seek to modify the database, would not proceed
at all.

This would be for mysql.

A better way would be to make a user with only select priviliges, and
no insert/update/drop privilige.

An even tighter method, if you're using a version of MySQL that supports
stored procedures, is to use them to define an API for access to your
data.
Then you can give a user permission to execute your API procedures, and
no
low-level access at all.
Well, that's of course less tight then no alteration whatsoever, but
indeed a very usefull one to keep basic functionality and alterations
going with a limited user while keeping integrity.
--
Rik Wasmus
[SPAM] Now temporarily looking for some smaller PHP/MySQL projects/work to
fund a self developed bigger project, mail me at rik at rwasmus.nl. [/SPAM]


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.