problem with mysql 5 install and configuration

Brandon Allbery allbery.b at gmail.com
Sun Jan 8 06:54:15 PST 2012


On Sun, Jan 8, 2012 at 09:33, Érico <ericomtx at gmail.com> wrote:

> 2. my sql id ships already in the OS ? I think not, right ?
>

As I said in my previous message, it's already there because OS X comes
with mysql.


> Was that necessary ? or when installing postgres mcaports also installs a
> postgres id ?
>

Found in the postgresql90-server Portfile:

destroot {
addgroup ${dbgrp}
set gid [existsgroup ${dbgrp}]
adduser ${dbuser} shell=/bin/sh gid=${gid} \
home=${prefix}/var/db/postgresql90 \
realname=PostgreSQL-90\ Server
xinstall -m 755 -d ${destroot}${logdir}
system "touch ${destroot}${logdir}/postgres.log"
system "chown ${dbuser}:${dbgrp} ${destroot}${logdir}/postgres.log"
}

So the port added it for you already.

8. back to mysql ... I have uninstalled mysql from my mac :
> bash-3.2# port uninstall mysql5-server @5.1.60_0
> bash-3.2# port uninstall mysql5 @5.1.60_0
>
> bash-3.2# port clean --all mysql5-server @5.1.60_0
> bash-3.2# port clean --all mysql5 @5.1.60_0
>
> I can see _mysql id is still in /etc/group file :
> _mysql:*:74:
>
> but it is not in /etc/passwd ....
>
> How can I fix my environment ?
>

It may not need fixing.  Try "dscl . read /Users/_mysql".

Remember, on OS X, /etc/passwd and /etc/group are only used during boot
before directoryservicesd (or opendirectoryd) is running.

If it *does* need to be re-added for some reason, mysql5-server's Portfile
has code similar to what I pasted above from postgresql90-server, so it
will recreate the user if necessary.  Still, ideally you should probably
not remove service users/groups; it's not like they slow the system down or
something, and if there's no process under that uid the only way it can be
accessed is via root so there's no significant security aspect to leaving
it around.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120108/22909dbb/attachment.html>


More information about the macports-users mailing list