problem with mysql 5 install and configuration

Ryan Schmidt ryandesign at macports.org
Sun Jan 8 17:11:36 PST 2012


On Jan 8, 2012, at 08:33, Érico wrote:

> It was missing in the pst note the following : 
> 
> 1. when installing mysql with the regular command : 
> sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
> do you guys create the mysql id ? or it needs to be created before that ... ? 
> 
> 2. my sql id ships already in the OS ? I think not, right ?

Mac OS X 10.3 Panther and 10.4 Tiger include a user called "mysql".
Mac OS X 10.5 Leopard and 10.6 Snow Leopard include a user called "_mysql".
I have not used Mac OS X 10.7 Lion yet but my understanding is that because the license of MySQL has switched to GPL3, and Apple does not like the GPL3 license, Apple has removed MySQL from Mac OS X Lion Server and replaced it with PostgreSQL; I do not know if they therefore no longer include the _mysql user in the OS.
If the user does not exist, the mysql5-server port in MacPorts will create it.


> 3. do I need to add the user manually like in linux OS or should I use dscl application for it ?

You do not need to manually add the user. It will already be there from the OS, or if not, MacPorts will create it.


> 4. I have also installed postgres in my mac : 
> 
> postgresql83 @8.3.16_0 (active)
>   postgresql83-server @8.3.16_0 (active)
>   postgresql90 @9.0.5_1 (active)
>   postgresql90-server @9.0.5_0 (active)
>   postgresql91 @9.1.1_1 (active
> 
> 5. But I created a postgres id with dscl as follows : 
>  ericomtx$ sudo dscl . -create /Users/postgres
> ericomtx$ sudo dscl . -create /Users/postgres UserShell /bin/bash
> ericomtx$ dscl . -create /Users/postgres RealName "postgres 831"
> ericomtx$ sudo dscl . -create /Users/postgres RealName "postgres 831"
> ericomtx$ sudo dscl . -create /Users/postgres UniqueID 8005
> ericomtx$ sudo dscl . -create /Users/postgres NFSHomeDirectory /Users/postgres
> ericomtx$ sudo dscl . -passwd /Users/postgres  xxxx
> ericomtx$ sudo dscl . -create /Users/postgres PrimaryGroupID 20
> 
> Was that necessary ? or when installing postgres mcaports also installs a postgres id ?

You do not need to manually add the user. The postgresql*-server ports will create it for you.


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

OS X does not use /etc/passwd very much; I wouldn't look into that file for any accurate information.


> How can I fix my environment ?

Your environment seems to be fine.




More information about the macports-users mailing list