This is a discussion on DROP TABLE customers within the MySQL Database forums, part of the Database Forums category; I would like to know if Perl's DBI supports an attribute that would make a database handle read only. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. Thanks -- 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/ |
|
|||
|
On 9 May, 15:11, Ignoramus26246 <ignoramus26...@NOSPAM.26246.invalid>
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. > > Thanks > -- > 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/ I would reply, but according to your sig, you won't see it! |
|
|||
|
On Fri, 09 May 2008 10:11:03 -0500, 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. > > Thanks MySQL user security[1] will handle this. [1] Given the normal implementation of MySQL in hosting environments, this might be what you want to hear.[2] [2] If so, try another way :-) -- p BotM#1 LotR#9 http://www.last.fm/user/prawnuk |
|
|||
|
On 9 May, 15:20, prawn <sean.pr...@gmail.com> wrote:
> On Fri, 09 May 2008 10:11:03 -0500, 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. > > > Thanks > > MySQL user security[1] will handle this. > > [1] Given the normal implementation of MySQL in hosting environments, > this might be what you want to hear.[2] > > [2] If so, try another way :-) > -- > p BotM#1 LotR#9http://www.last.fm/user/prawnuk I think you meant: [1] Given the normal implementation of MySQL in hosting environments, this might NOT be what you want to hear.[2] [2] If so, try another way :-) |
|
|||
|
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. -- Rik Wasmus [SPAM] Now looking for some smaller projects to work on to fund a bigger one with delayed pay. If interested, mail rik at rwasmus.nl [/SPAM] |
|
|||
|
On Fri, 09 May 2008 08:33:15 -0700, Captain Paralytic wrote:
> I think you meant: > [1] Given the normal implementation of MySQL in hosting environments, > this might NOT be what you want to hear.[2] > > [2] If so, try another way :-) Doh! Friday afternoon syndrome strikes. -- p BotM#1 LotR#9 http://www.last.fm/user/prawnuk |
|
|||
|
Ignoramus26246 <ignoramus26246@NOSPAM.26246.invalid> wrote:
Oh, are we at number 26246 already? All the other 26245 have been killfiled by everyone, I guess. That's why you need to come up with a new identity every few days. Won't help you.... jue |
|
|||
|
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/ |
|
|||
|
On 2008-05-09, Jürgen Exner <jurgenex@hotmail.com> wrote:
> Ignoramus26246 <ignoramus26246@NOSPAM.26246.invalid> wrote: > > Oh, are we at number 26246 already? All the other 26245 have been > killfiled by everyone, I guess. That's why you need to come up with a > new identity every few days. Won't help you.... > > jue Only stupid people cannot figure out how to killfile by regular expression. -- 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/ |
|
|||
|
Ignoramus26246 <ignoramus26246@NOSPAM.26246.invalid> writes:
> 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. Define a user that has the permissions you want, and log in with DBI using that user. sherm-- -- My blog: http://shermspace.blogspot.com Cocoa programming in Perl: http://camelbones.sourceforge.net |
![]() |
| Thread Tools | |
| Display Modes | |
|
|