Skip to main content

Set up MySQL on your MacBook Pro with the M1 (Apple Silicon)

Set up MySQL on your MacBook Pro with the M1 (Apple Silicon). I'll give you the step-by-step installation methods. You can choose whichever suits you best:


✅ Method 1: Install MySQL using Homebrew (Recommended)

This is the easiest and cleanest way.

  1. Install Homebrew (if not already installed):
    Open Terminal and run:

     Terminal Command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  1. Install MySQL:

    brew install mysql
  2. Start MySQL service:

    brew services start mysql
  3. Check MySQL status:

    brew services list
  4. Login to MySQL:

    mysql -u root
  5. (Optional) Set root password:

    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password'; FLUSH PRIVILEGES;

✅ Method 2: Install MySQL using the official DMG installer

If you prefer GUI setup:

  1. Go to MySQL Community Downloads.

  2. Select macOS (ARM64) for M1.

  3. Download the DMG Archive and install it like a normal app.

  4. During installation, it will ask you to set a root password → save it.

  5. After installation, open System Preferences → MySQL to start/stop MySQL.

  6. Test installation:

    mysql -u root -p

✅ Method 3: Install via Docker (for isolated setup)

If you use Docker:

  1. Install Docker Desktop for Mac (Apple Silicon).

  2. Run MySQL container:

    docker run --name mysql8 -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d mysql:8
  3. Connect:

    mysql -h 127.0.0.1 -P 3306 -u root -p

🔍 Verify Installation

Run:

mysql --version

You should see something like:

mysql Ver 8.0.xx for macos11.6 on arm64 (Homebrew)


Comments

Popular posts from this blog

How to write a code of Encode and Decode json data in Dart language

 Encode and decode JSON data in dart language import 'dart:convert'; void main() {   // Original data as a Dart map   Map<String, dynamic> originalData = {     'field1': 'value1',     'field2': 42,     'field3': true,   };   // Encode the Dart map to JSON string   String jsonString = jsonEncode(originalData);   print('Original JSON String:');   print(jsonString);   // Encode the JSON string to base64   String base64EncodedString = base64.encode(utf8.encode(jsonString));   print('\nBase64 Encoded String:');   print(base64EncodedString);   // Decode the base64 string to JSON string   String decodedJsonString = utf8.decode(base64.decode(base64EncodedString));   print('\nDecoded JSON String:');   print(decodedJsonString);   // Decode the JSON string to a Dart map   Map<String, dynamic> decodedData = jsonDecode(decodedJsonString);   print('\nDecoded Dart Ma...

About of Free Learning Tech Point

  Welcome to Free Learning Tech Point , where knowledge meets accessibility. Our platform is dedicated to providing high-quality educational resources and e-learning opportunities to learners around the world, completely free of charge. Our Mission: At Free Learning Tech Point, we believe that education is a fundamental right, and everyone should have access to valuable learning materials. Our mission is to break down barriers to education by offering a diverse range of courses, tutorials, and resources across various subjects and disciplines. What Sets Us Apart: - Free Access: Our commitment is to make learning accessible to all. No subscription fees, no hidden costs – just free, open access to knowledge.    - Quality Content: We curate and create content that is both engaging and informative. Whether you're a student, professional, or lifelong learner, our resources are designed to cater to various learning styles and levels. - Diverse Subjects: From tech and science...

Privacy Policy Of Free Learning Tech Point

  Thank you for visiting Free Learning Tech Point . You can use our website, services, and products with the awareness that this Privacy Policy describes how we gather, use, disclose, and protect your personal information. 1- Information We Collect: We may collect personal information that you provide directly to us, such as your name, email address, and any other information you choose to provide when using our Services. We may also collect non-personal information, such as aggregated data and usage patterns. 2- How We Use Your Information: We may use the information we collect for various purposes, including but not limited to: Providing and improving our Services. Responding to your inquiries and requests. Analyzing usage patterns and trends. Sending you updates, newsletters, and other communications. Personalizing your experience on our platform. 3- Cookies and Similar Technologies: We may use cookies and similar technologies to collect information about your interactions with...