MySQL https://www.novicedev.com/ en How to install MySQL on macOS with Homebrew https://www.novicedev.com/blog/how-install-mysql-macos-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> <div class="field-item"> <div class="paragraph paragraph--type--text paragraph--view-mode--default"> <div class="field field--name-field-para-text field--type-text-long field--label-hidden field-item"><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 this guide on how to <a href="/blog/installing-homebrew-macos-beginners-guide">install Homebrew on MacOS</a></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> </div> </div> </div> <div class="field-item"> <div class="paragraph paragraph--type--also-read paragraph--view-mode--default"> <div class="node-taxonomy-container"> <ul class="taxonomy-terms"> <li class="taxonomy-term"><article data-history-node-id="32" role="article" class="node node-view-mode-also-read"> <h3 class="also-read-h3">Also Read</h3> <div class="also-read-content"> <div class="also-read-title"> <a href="/blog/7-tv-shows-every-programmer-should-binge-watch" target="_blank" rel="bookmark"><span>7 TV Shows Every Programmer Should Binge Watch</span> </a> </div> <div class="node-content clear"> <a href="/blog/7-tv-shows-every-programmer-should-binge-watch" target="_blank"> <div class="field field--name-field-image field--type-image field--label-hidden field-item"> <img loading="lazy" src="/sites/novicedev/files/styles/also_read/public/2022-12/Top%20TV%20Shows%20for%20Techies%20to%20Binge%20Watch.jpg?itok=qTpG8Ixe" width="115" height="65" alt="7 TV Shows Every Programmer Should Binge Watch" title="7 TV Shows Every Programmer Should Binge Watch" class="image-field" /> </div> </a> </div> </div> </article> </li> </ul> </div> <!--/.node-taxonomy-container --> </div> </div> <div class="field-item"> <div class="paragraph paragraph--type--text paragraph--view-mode--default"> <div class="field field--name-field-para-text field--type-text-long field--label-hidden field-item"><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="https://www.sequelpro.com/">https://www.sequelpro.com/</a></li> <li>TablePlus - <a href="https://tableplus.com/">https://tableplus.com/</a></li> </ul> <p> </p> <p>Cover Photo by <a href="https://unsplash.com/@devintavery?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Devin Avery</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field-item"><p><meta charset="utf-8" /></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" 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 https://www.novicedev.com