[HCoop-Help] MySQL question

Davor Ocelic docelic at hcoop.net
Tue Aug 12 04:07:26 EDT 2008


On Tue, 12 Aug 2008 10:17:20 +0300
Omry Yadan <omry at yadan.net> wrote:

> not quite:
> 
> you can only drop databases through the dbtool.
> 
> to drop tables, you need to first run the mysql-fixperms script and
> then drop them normally.

Yes, correct.

The reason we were forced to introduce mysql-fixperms is one
shortcoming in MySQL's permission model.

When you grant DROP on DATABASE.* to someone, then that rule also
implicitly gives them the privilege to DROP not only all tables, but
also the database itself.

And we can't allow database drop, because it would delete files from
our custom location, and then the re-run of "CREATE DATABASE" would
create it in the incorrect location on the disk.

The only way to have mysql grant drop on tables but not on the database
is to name tables individually. So what mysql-fixperms does is look 
into your databases, find tables, and explicitly grant you drop on 
them.

Note that you only need to run it when you add new tables for the 
first time... If you drop and re-create tables at some point, the
permissions still stay there so no need for another fixperms.

Cya,
-doc

> Franklin Gordon Bynum wrote:
> 
> > On Mon, 11 Aug 2008 20:56:14 -0500, "C. Howell" <caden at hcoop.net>
> > wrote: 
> >> My goal is to be able to drop tables I create in my caden_testprep
> >> database.
> >>     
> >
> > Hi, Caden.  AFAIK, our database setup only allows members to drop
> > tables in MySQL through the dbtool program.
> >
> > http://wiki.hcoop.net/MemberManual/Databases
> >
> > I don't know about your second question.
> >
> >
> > _______________________________________________
> > HCoop-Help mailing list
> > HCoop-Help at lists.hcoop.net
> > https://lists.hcoop.net/listinfo/hcoop-help
> >   
> 
> 
> _______________________________________________
> HCoop-Help mailing list
> HCoop-Help at lists.hcoop.net
> https://lists.hcoop.net/listinfo/hcoop-help



More information about the HCoop-Help mailing list