View Single Post

  #8 (permalink)  
Old 05-09-2008
Ignoramus26246
 
Posts: n/a
Default Re: DROP TABLE customers

On 2008-05-09, Rik Wasmus <luiheidsgoeroe@hotmail.com> wrote:
> 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. Trying to get this in Perl's DBI seems
> needlessly complicated, and in any way less reliable then on database level.
>
> Of course, there's no objection to having two connection to a database:
> one which can alter, and one which can't.


Yes. We have one ID which is read/write. A lot of scripts that are
information only, would benefit from saying "I do not want to change
anything", that would make them safer wrt errors.

Otherwise, I agree with your comment. Two IDs would be cleaner.
--
Due to extreme spam originating from Google Groups, and their inattention
to spammers, I and many others block all articles originating
from Google Groups. If you want your postings to be seen by
more readers you will need to find a different means of
posting on Usenet.
http://improve-usenet.org/
Reply With Quote