DEV Community

Cover image for MySQL in Mac (M1)
Emmanuel Morales
Emmanuel Morales

Posted on

1 1

MySQL in Mac (M1)

Pre-Requisites

  • I'll use Homebrew as the package manager.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Enter fullscreen mode Exit fullscreen mode

Installing MySQL

  • Install MySQL:
brew install mysql
Enter fullscreen mode Exit fullscreen mode
  • Before setting up MySQL we have to start the brew services
brew services start mysql
Enter fullscreen mode Exit fullscreen mode

Note: To stop mysql we set

brew services stop mysql

Setting up MySQL

Without Password

  • We just type:
mysql -uroot
Enter fullscreen mode Exit fullscreen mode

and our session is on, we can exit the session by typing

mysql> exit
Enter fullscreen mode Exit fullscreen mode

With Password

  • We type:
mysql_secure_installation
Enter fullscreen mode Exit fullscreen mode

Note: ”Validate password component" needs a secure sequence of characters to set the password, this include as minimum 8 characters and other more patterns.
If we set y (yes), it'll require that pattern, if we don't want that it, we just set n (no).

  • Recommended answers in the installation
# Remove anonymous users?:
y
#Disallow root login remotely?:
n
# Remove test database and access to it?:
y
# Reload Privilege tables now?:
y
Enter fullscreen mode Exit fullscreen mode
  • To start the mysql session with password we just type:
mysql -uroot -p
Enter fullscreen mode Exit fullscreen mode

and it will ask the password.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs