Here comes my 2 cents...

The 'advantage' of installing a package such as MySQL on your system as
"root",  is that the "root" user would be the only one able to 'modify'
permissions on the installed files.   You'd still create a "mysql" user and
"mysql" group, which would be assigned to the "var" (default data directory)
subdirectory, and any other 'data' directories (or support script areas and
files) that the 'mysql' user (which you would start the MySQL daemon as) and
all the 'mysql' users (which you'd have placed in the "mysql" group)
required access to.

If the system you're installing the MySQL stuff on, is a 'shared' machine,
that you don't have 'superuser' access to, and "mysql" is just a project
you're dealing with,  you probably would want to install it as yourself or
another 'non-root' user.

If MySQL is one of the primary applications that this system is responsible
for (i.e. your company's main DB server,  or any other 'production' system
which requires a database),  you'll want to install it as "root" to protect
it's integrity.  You wouldn't be denying any form of access to 'mysql' users
and developers,  but you'd be keeping them from tampering with the
installation of the product.

I have installed all of my MySQL instances as "root" (I'm up to 8 running
installations now) and set the following directories with the shown
permission settings:

        /usr/local/mysql/var:   mysql.mysql  rwxrws---    (the "var"
subdirectory is 'owned' and 'grouped' as "mysql" and the "s" shows that the
'group suid' bit is set, ensuring that all files created within the
subdirectory will be given the same group assignment).  No one outside of
the "mysql" group has any form of access (though "root" always has full
control).  The same ownership and permissions settings are used for the
directories within "var" (such as the "mysql" 'control' file directory).

        /usr/local/mysql/var/mysql/*:  mysql.mysql rw-rw----  (Similiar to
the directory settings.  The "mysql" user 'owns' the files, and has the abil
ity to change file permissions and ownerships,  and the "mysql" group has
'read/write' access to the file(s).  No one else has any form of access,
except for "root").

----- Original Message -----
From: "Paul DuBois" <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 5:31 PM
Subject: Re: Intalling MySQL


> At 7:21 PM -0500 7/13/01, Mike<mickalo>Blezien wrote:
> >Paul,
> >
> >thanks for the info. So if I'm ready this correctly, I would log
> >into the server
> >under my UNIX account, not as root, do the install of the server/client
Mysql,
> >create the new user/group, which would make me part of the new
> >user/group, then
> >start the server under this user/group. Is this correct??
>
> Not really.  You have to be root to create the new user/group, for
example.
> And creating it doesn't make you part of that user/group.
>
> Or I may just not be understanding you.  Here's one way to do it:
> - As the UNIX root user, create the user/group that you intend to use
>    for running the MySQL server
> - Log in as that user and build/install MySQL.  (By doing this as that
>    user, all the files will be owned by that user.)
> - Start the server, either as that user, or as root.  In the latter case,
>    specify the --user=xxx flag where xxx is the account you want to use
for
>    running the server.
>
> There are other variations, such as installing everything as root.
> In this case, you may have to change the ownership of the stuff in
> the data directory to the non-root account or the server won't be able
> to access database files when you run the server as that user.
>
> >
> >>>On Fri, 13 Jul 2001 19:14:48 -0500, Paul DuBois <[EMAIL PROTECTED]>
wrote:
> >
> >>>>I'm a bit confused on this issue of installing MySQL and creating
> >>>>a separate
> >>>>user/group ownership. Now I've read thru many resources, and it
> >>>>recommends not
> >>>>installing MySQL as root, or is this incorrect??
> >>>
> >>>That's correct, you don't want to run the server as root.
> >>>
> >>>>
> >>>>Is it better to create the new user/groups, then install MySQL under
these
> >>>>user/groups or install MySQL as root, then  after the install,
> >>>>create the new
> >>>>user/groups before starting the MySQL server after the install??
> >>>
> >>>Doesn't matter.
> >
> >Mike(mickalo)Blezien
> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >Thunder Rain Internet Publishing
> >Providing Internet Solutions that work!
> >http://www.thunder-rain.com
> >Tel: 1(225)686-2002
> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
> --
> Paul DuBois, [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to