DROP TABLE customers

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. ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 1 Week Ago
Ignoramus26246
 
Posts: n/a
Default DROP TABLE customers

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/
Reply With Quote
  #2 (permalink)  
Old 1 Week Ago
Captain Paralytic
 
Posts: n/a
Default Re: DROP TABLE customers

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!
Reply With Quote
  #3 (permalink)  
Old 1 Week Ago
prawn
 
Posts: n/a
Default Re: DROP TABLE customers

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
Reply With Quote
  #4 (permalink)  
Old 1 Week Ago
Captain Paralytic
 
Posts: n/a
Default Re: DROP TABLE customers

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 :-)
Reply With Quote
  #5 (permalink)  
Old 1 Week Ago
Rik Wasmus
 
Posts: n/a
Default Re: DROP TABLE customers

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]
Reply With Quote
  #6 (permalink)  
Old 1 Week Ago
prawn
 
Posts: n/a
Default Re: DROP TABLE customers

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
Reply With Quote
  #7 (permalink)  
Old 1 Week Ago
Jürgen Exner
 
Posts: n/a
Default Re: DROP TABLE customers

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
Reply With Quote
  #8 (permalink)  
Old 1 Week Ago
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
  #9 (permalink)  
Old 1 Week Ago
Ignoramus26246
 
Posts: n/a
Default Re: DROP TABLE customers

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/
Reply With Quote
  #10 (permalink)  
Old 1 Week Ago
Sherman Pendley
 
Posts: n/a
Default Re: DROP TABLE customers

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
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:01 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0