title: What user should own /usr/local/mysql on Mac?
body: <p>What should the file owner &amp; group be of <code>/usr/local/mysql</code> and all contained files &amp; directories? MySQL was working fine, but after I did <code>sudo chown -R $USER:staff /usr/local</code> to install <a href="https://brew.sh/" rel="nofollow noreferrer">Homebrew</a>, MySQL couldn't automatically start on startup, and on the MySQL Preferences panel, I got &quot;Warning: The /usr/local/mysql/data directory is not owned by the 'mysql' or '_mysql' user,&quot; and when I clicked Start MySQL Server, it didn't connect.</p>
  <p>To fix this, I ran <code>sudo chown -R _mysql:wheel /usr/local/mysql/data</code>. Then, I closed &amp; opened System Preferences. The warning went away, and when I clicked Start MySQL Server, it started!</p>
  <p>MySQL seems to be responding fine now, but I just guessed at this solution. Is what I did correct?</p>