MySQL en How to install MySQL on macOS with Homebrew <span>How to install MySQL on macOS with Homebrew</span> <div class="field field--name-field-image field--type-image field--label-hidden field-item"> <img loading="lazy" src="/sites/novicedev/files/styles/blog_cover/public/2021-10/How%20to%20install%20MySQL%20on%20macOS%20with%20Homebrew_0.png?itok=UA-VW6Ip" width="772" height="464" alt="How to install MySQL on macOS with Homebrew" title="How to install MySQL on macOS with Homebrew" class="image-field" /> </div> <span><span>noviceadmin</span></span> <span>Mon, 10/11/2021 - 14:29</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field-item"><p><meta charset="utf-8" /></p> <p>This tutorial will guide you to install MySQL on your macOS with Homebrew.</p> <p>Homebrew is a package manager to provide a command-line tool to manage your utilities and applications.</p> <p><strong>NOTE:</strong> Make sure you have homebrew installed. If not then simply follow the guide here <a href=""></a></p> <p> </p> <h2><strong>Installation process:</strong></h2> <p><strong>1. Now simply run the below command in your terminal</strong></p> <pre> <code>$ brew install mysql</code></pre> <p><strong>2. Start the MySQL service</strong></p> <pre> <code>$ brew services start mysql</code></pre> <p><strong>3. Set root MySQL password</strong></p> <pre> <code>$ mysqladmin -u root password 'secretpassword'</code></pre> <p><strong>4. Access MySQL on mac</strong></p> <pre> <code>$ mysql -u root -p</code></pre> <p>Command will ask the password you just set in the previous step.</p> <p> </p> <h2>Things to remember</h2> <p><strong>Stop MySQL service on Mac start</strong></p> <p>If you don't want MySQL service to start every time you start your mac then run the below command</p> <pre> <code>$ brew services stop mysql</code></pre> <p>This will stop the MySQL service from running in the background.</p> <p><strong>Start MySQL service</strong></p> <p>You can always run the below command to start the MySQL server on mac and it will not start on the next computer restart</p> <pre> <code>$ mysql.server start</code></pre> <p><strong>Stop MySQL service</strong></p> <p>If you want to immediately stop the MySQL service then run the below command</p> <pre> <code>$ mysql.server stop</code></pre> <p><strong>GUI clients to access database</strong></p> <p>And you can also access your database with mac MySQL client to make your life easy. Here are a couple of suggestions:</p> <ul> <li>Sequel Pro - <a href=""></a></li> <li>TablePlus - <a href=""></a></li> </ul> <p> </p> <p>Cover Photo by <a href=";utm_medium=referral&amp;utm_content=creditCopyText">Devin Avery</a> on <a href=";utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p> </div> <div class="node-taxonomy-container"> <ul class="taxonomy-terms"> <li class="taxonomy-term"><a href="/topic/homebrew" hreflang="en">Homebrew</a></li> <li class="taxonomy-term"><a href="/topic/mysql" hreflang="en">MySQL</a></li> <li class="taxonomy-term"><a href="/topic/macos" hreflang="en">MacOS</a></li> </ul> </div> <!--/.node-taxonomy-container --> <section id="node-article-comment--2" id="comments"> <div class="comment-form-wrap"> <h2 class="add-comment-title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=14&amp;2=comment&amp;3=comment" token="fmIfbiR8nl0e3Twra6AbI8B26q-U9xssL7b2YNbxsOs"></drupal-render-placeholder> </div> <!--/.comment-form --> </section> Mon, 11 Oct 2021 14:29:20 +0000 noviceadmin 14 at