AFAIU, OS X has a collection of built in users, and one of these users is 'mysql' user.

The reason I am making this guess is, the first time I have installed mysql server using the dmg, it installed fine. However, later I have uninstalled it and deleted mysql users. When I wanted to reinstall it later again from dmg, the installation kept failing until I recreated the 'mysql' user and 'mysql' group.

So, is there any way to recover the built in Directory Service data (such as Users, Groups, etc.)?


There is a daemon that backups the directory /private/var/db/dslocal nightly. If the backup hasn't occurred since the removal of the user then the info could be restored. The archive is /private/var/db/dslocal-backup.xar.

An alternate solution for "system" users and groups:

Rebuild the corresponding user and group plist's from /private/etc/passwd and /private/etc/group.

  • This worked. If an answer which explains how to get factory settings doesn't show up, I am going to accept this one.
    – Utku
    Sep 12 '16 at 12:33

I don't believe there's a way to restore system users- perhaps re-run the installer? I'd probably just look at another system with the same version of the OS to compare. In this case, you may have been able to copy the following files (and then correct permissions):


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .