Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think one can end up in this position with older versions of mysql already installed. I had the same problem and none of the above solutions worked for me. I fixed it thus:</p> <p>Used brew's <code>remove</code> &amp; <code>cleanup</code> commands, unloaded the <code>launchctl</code> script, then deleted the mysql directory in <code>/usr/local/var</code>, deleted my existing <code>/etc/my.cnf</code> (leave that one up to you, should it apply) and launchctl plist</p> <p>Updated the string for the plist. Note also your alternate security script directory will be based on which version of MySQL you are installing.</p> <p>Step-by-step:</p> <pre><code>brew remove mysql brew cleanup --force launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist sudo rm -rf /usr/local/var/mysql </code></pre> <p>I then started from scratch:</p> <ol> <li>installed mysql with <code>brew install mysql</code></li> <li><p>ran the commands brew suggested: (see note: below)</p> <pre><code>unset TMPDIR mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp </code></pre></li> <li><p>Start mysql with <code>mysql.server start</code> command, to be able to log on it</p></li> <li><p>Used the alternate security script:</p> <pre><code>/usr/local/Cellar/mysql/5.5.10/bin/mysql_secure_installation </code></pre></li> <li><p>Followed the <code>launchctl</code> section from the brew package script output such as,</p> <pre><code>#start launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist #stop launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist </code></pre></li> <li><p>Boom.</p></li> </ol> <p>Hope that helps someone!</p> <p><strong>Note:</strong> the <code>--force</code> bit on <code>brew cleanup</code> will also cleanup outdated kegs, think it's a new-ish homebrew feature.</p> <p><strong>Note the second:</strong> a commenter says step 2 is not required. I don't want to test it, so YMMV! </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload