title: MySQL error: "The server quit without updating PID file"
body: <p>I know this is a widelly answered question but I cannot find one solution that apply to my case.<br><br>
  On OSX El Capitan, I recently switched from a MAMP install to a "manual" install of MySQL, using the dmg package (version 5.7.11).<br><br>
  Now I want to modify the <code>datadir</code> to a custom location ; it used to work but I stopped the server and it doesn't want to start anymore. I tried launching it using:</p>
  
  <pre><code>sudo mysql.server start
  sudo mysqld_safe
  </code></pre>
  
  <p>...but I always get this error: <code>The server quit without updating PID file (/Users/xxx/Documents/dev/MySQL/data/xxx.pid)</code>. But it starts whan I set back the <code>datadir</code> to its original location! (which is /usr/local/mysql/data)<br><br>
  First time I had this issue it was clearly documented in the .err file (<code>error 13</code> if I remember well, which is an access problem) and it was fixed by the magic combination of <code>sudo chown -R _mysql:wheel data/</code> and <code>sudo chmod -R 777 data/</code>. Now both original and custom datadir have the <strong>same owners</strong> (user and group) and <strong>same read/write permissions</strong>. But server will start for one and not for the other? And the .err file only logs:</p>
  
  <pre><code>mysqld_safe Starting mysqld daemon with databases from /Users/xxx/Documents/dev/MySQL/data
  mysqld_safe mysqld from pid file /Users/xxx/Documents/dev/MySQL/data/xxx.pid ended
  </code></pre>
  
  <p>Which doesn't helps me much.
  Any ideas please?</p>