Ω Migrating from 10.6 to 10.n Where n>6

|

I am finally going to move most of my file services from an old piece of server iron to a new Mac mini. (The Xserve is truly a beautiful piece of hardware, but it’s time to stop consuming so many watts just to serve up weather data.) Problem is, I have lots of things running on that server which aren’t supported by the new versions of Mac OS X Server. The big two are a custom build of PHP and MySQL.

But… Mac OS X Server (MOSXS, for short) no longer comes with MySQL built in. Instead, it uses PostgreSQL to serve up wiki and calendar data. With Yosemite, Apple got a bit wise and separated the databases for server functions from user functions. However, they haven’t made it easy to actually use that database. No matter what I tried, psql failed with the same errors that everybody else has seen, namely:

home:log admin$ psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
home:log admin$

Apparently, there is a fairly easy solution to this problem as outlined here from user ajbr. Just in case Apple does something to the forums, here it is:

Hi there;

The server is running under user “_devicemgr”, and all you have to do is create a symbolic link to /Library/Server/ProfileManager/Config/var/PostgreSQL in /private/var, as follows:

ln -s /Library/Server/ProfileManager/Config/var/PostgreSQL /private/var/pgsql_socket

Also let others have write/read/exec privileges to the files there:

chmod -R o+wrx /Library/Server/ProfileManager/Config/var/PostgreSQL

Now you can run psql

sudo -u _devicemgr psql -d postgres

So, there is a way. But should I have the will?

Having updated PHP every time Mac OS X Server has been updated, I have been on that merry-go-round for long enough to know that if Apple updates PostgreSQL, I’ll have to maintain my databases every time they change it. (And that does happen, see commenter senso here.) Add in having to recode to use PostgreSQL from MySQL, and… I want off.

So how do I go about installing MySQL from scratch? I hate precompiled binaries. They feel so antiseptic and I don’t quite trust what happens underneath the hood. (No offense intended to them folks what do this work.) I like to build things from scratch, but I’ll admit: I’ve tried building MySQL from scratch, and it’s not for the faint of heart. And then I stumbled on this:

http://www.macminivault.com/mysql-mavericks/

Recent Comments