As I understand it, when you run the Gnome menu action to start MySQL, it prompts you for the root password, and automatically registers you to have the necessary RBAC rights to start the service. After that, any subsequent admin commands Just Work, and you are using the default service, which is what you want. So they don't have to call a script, just run a menu item "Start MySQL". That's what I did, and I had no idea all this fancy stuff was happening in the background.
Regarding running PostgreSQL with initdb and pg_ctl, yes, you can do this, but you have to do it every time you reboot. Not really what we want, I think. MySQL is darn easy to start right now on Solaris, without breaking any security policies. If we want to let it be the more attractive database to run on Solaris, then so be it, but I don't think that's what we want. David P.S. re-adding the discuss aliases... On Jan 11, 2008 3:45 PM, James Gates <james.gates at sun.com> wrote: > But how does a user (who can't read documentation or understand SMF) > know which script to call? > > Putting a script around a command that can be simply described in man > pages & documentation is pointless - unless you already know the name of > the script, you have to go looking for it in the documentation. > > I agree that having PostgreSQL management tasks in the Gnome menu would > be a great benefit. This is something I'd like to see myself. But this > is a completely different subject/RFE. > > > > Ludovic Champenois wrote: > > James Gates wrote: > > > >> The pre-existing PostgreSQL SMF service is disabled by default. So, if > >> you (as owner & single user of the machine) don't enable the SMF > >> service, the default port won't be used. So there's nothing really > >> forcing you to run PostgreSQL on a non-default port (I don't > >> understand your statement wrt. being forced to use a non-default > >> port). If you want a PostgreSQL instance that's owned & managed by you > >> and runs on the default port, just call 'initdb' followed by 'pg_ctl > >> start'. This is exactly what you have to do if you download the > >> community version. The presence of the SMF service doesn't prevent you > >> from doing anything that you can't also do on say, Linux. We're not > >> forcing you to use the pre-existing PostgreSQL SMF service. We only > >> ship it so that administrators have an example of how to manage a > >> global PostgreSQL instance using SMF, that they can quickly implement > >> if they wish. > >> > >> But if you do decide to enable the pre-existing PostgreSQL SMF > >> service, and you want to manage it from your personal username, then > >> yes - you need to assign the necessary privileges. I'm not convinced a > >> wrapper script is necessary though (even if there is one for MySQL) > >> since the command is so simple (and only needs to be run once): > >> > >> # usermod -P "Postgres Administration" <username> > >> > >> If you think there does need to be a script to do this though, then > >> feel free to raise an RFE. It will get reviewed in the PostgreSQL > >> Tech Team meeting (Tuesday). > > > > Yes, everything is so simple... > > Once you know what to do, once you know that you need to enable the smf > > service (so you need to know smf--which is not simple when come from > > Windows or Linux or Mac and you are only interested in Postgres and not > > the extra-powerful SMF framework), and you know the privilege name to > > add (do not type a typo in "Postgres Administration"... what if I am > > french or do not understand well English), and you know to run usermod > > command as root. > > Yes, it is so simple, but guess what: I am stupid, and the only thing I > > can understand is the Mac setup control panel or a Windows Start menu to > > realize that there are some menus that might help me when I click on > > them.... > > Or maybe when you try to register the Postgres DB in NetBeans, all this > > magic should be described or executed (once root password is prompted) > > for you: David, I know you can push this on the Nb side. > > > > Ludo > > ps: search on google to see all the conf questions/errors/tutorials/bugs > > around SMF. SMF is not for the people we want to steal from the > > Windows/Linux/Mac/Laptops communities yet. > > ps2: Running SXDE for a while, I did even know postgres was > > pre-installed... A Start Menu Item would have help me there as en entry > > point. > > > >> > >> > >> David Van Couvering wrote: > >> > >>> I understand the value of running a "private" instance in the scenario > >>> of multiple developers working on the same machine. But really, how > >>> common is this? > >>> > >>> Meanwhile, in the common case, where I am a developer on my machine > >>> and I'm the only one using it (that's how we all work, right?), I am > >>> now having to run PostgreSQL on a non-default port. And there is > >>> this perfect good pre-existing PostgreSQL SMF service on the default > >>> port that I am not allowed to touch. On a Mac or PC (even on Linux), > >>> I can download PostgreSQL or MySQL, install it, and start running it > >>> on the default port. Nobody seems to complain about this. > >>> > >>> I think Ludo's solution of providing a script to quickly grant the > >>> necessary rights makes a lot of sense. > >>> > >>> I would suggest that if we get a lot of complaints about collisions > >>> between multiple developers trying to use the same instance, then we > >>> can consider the more heavyweight solution of providing a user-generic > >>> SMF service. > >>> > >>> Thanks, > >>> > >>> David > >>> > >>> On Jan 11, 2008 11:15 AM, James Gates <james.gates at sun.com> wrote: > >>> > >>>> I interpreted Ludo's explanation to mean every user that has been > >>>> assigned the RBAC authority with their script can control the *global* > >>>> instance of MySQL/Apache (which the webstack team have defined & > >>>> provided the necessary xml manifest). > >>>> > >>>> > >>>> > >>>> Josh Berkus wrote: > >>>> > >>>>>> Jignesh suggested having multiple SMF services (one for each user, > >>>>>> each with their own PostgreSQL instance, managing their own > >>>>>> databases). This is preferable, and worth pursuing. But I'm not sure > >>>>>> how you can do this with SMF. As far as I'm aware the SMF service > >>>>>> instances have to be predetermined. > >>>>> > >>>>> > >>>>> > >>>>> Hmmm, then how does it work for MySQL? Surely we're not allowing > >>>>> every > >>>>> user on the system to control the *global* instance of MySQL/Apache? > >>>>> > >>>>> --Josh > >>>> > >>>> > >>> > >>> > >>> > > > -- David W. Van Couvering http://davidvancouvering.blogspot.com