MySQL
OSX
Installation
Database
User Management

MySQL user DB does not have password columns - Installing MySQL on OSX

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

MySQL is a widely-used open-source relational database management system designed to handle a large volume of data effectively. It's especially popular for web applications and organization-level data management. Installing MySQL on macOS requires a few systematic steps which we will explore in this article, along with addressing the common misconception about password storage in MySQL's `mysql.user` table.

Installing MySQL on macOS

Prerequisites

Before downloading MySQL, ensure that your macOS system meets these requirements:

  • macOS 10.13 or later
  • At least 1GB of RAM (though more may be required for large databases)
  • Adequate disk space

Step-by-Step Installation

1. Download MySQL

Visit the official MySQL Downloads page and select the macOS version that suits your system configuration. Choose the DMG archive format to simplify the installation process.

2. Install MySQL

  1. Once downloaded, open the DMG file and double-click the MySQL installer package.
  2. Follow the installation instructions. You'll be prompted to choose between different installation types:
    • Developer Default: Installs the MySQL server, client, utilities, and documentation.
    • Server Only: Installs only the MySQL server.
    • Custom: Allows you to select individual components to install.
  3. During installation, you'll be asked to set a root password. Make sure to choose a strong password and note it down for future reference.

3. Starting MySQL Server

After the installation, you need to start the MySQL server:

  • You can start the server manually by navigating to `System Preferences` > `MySQL` and clicking on `Start MySQL Server`.

4. Testing the Installation

To verify that the installation is successful, open the Terminal application and execute:

  • Hashes, not Plain Text: Passwords are not stored as plain text; instead, they are hashed using secure cryptographic algorithms. This ensures that even if the `mysql.user` table is accessed maliciously, the passwords are not simply readable.
  • Authentication String Column: The actual password information is stored in the `authentication_string` column. This column does not contain the plain text password but rather a hash of it.
  • Plugin Column: This defines the authentication plugin to use. By default, hashing plugins like `mysql_native_password` or `caching_sha2_password` are used.

Course illustration
Course illustration

All Rights Reserved.