mysql5-server port - General Questions

Scott Haneda talklists at newgeo.com
Wed Jan 6 20:06:01 PST 2010


Why does this need to be there:
if {"darwin" == ${os.platform} && ${os.major} > 8} {
    set mysqluser       _mysql
} else {
    set mysqluser       mysql
}

$sudo chown mysql:mysql something
-rw-r--r--   1 _mysql  _mysql    0 Jan  6 19:59 something

$sudo chown me:me something
$sudo chown _mysql:_mysql something
-rw-r--r--   1 _mysql  _mysql    0 Jan  6 19:59 something

Seems to be, you can pretty safely just use mysql, and not worry about it.

In the destroot phase, it looks like a mysql user and group is being added.  I do not see any OS level conditions there, why is this happening?  mysql has been a built in user on OS X since I believe 10.3, which should be about as far back as MacPorts is going to support?

Why don't we chown the dirs for the user so they need not do so?

From this page:
http://trac.macports.org/wiki/howto/MAMP
Step 3

    sudo -u mysql mysql_install_db5 
    sudo chown -R mysql:mysql /opt/local/var/db/mysql5/ 
    sudo chown -R mysql:mysql /opt/local/var/run/mysql5/ 
    sudo chown -R mysql:mysql /opt/local/var/log/mysql5/ 
    
    If that doesn’t work try this:
    
    sudo mysql_install_db5 
    sudo chown -R mysql:mysql /opt/local/var/db/mysql5/ 
    sudo chown -R mysql:mysql /opt/local/var/run/mysql5/
    
First, what would cause the first set of steps to fail, and what can we do to make sure they do not?  Second, other than the `mysql_install_db5`, I believe the rest of that work should be done in the Portfile, unless there is good reason not to.

Thanks for any comments
-- 
Scott * If you contact me off list replace talklists@ with scott@ * 



More information about the macports-dev mailing list