The Wayback Machine - https://web.archive.org/web/20240104065338/https://www.geeksforgeeks.org/how-to-install-mysql-on-macos/
Open In App
Related Articles

How to Install MySQL on MacOS?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

MySQL is an open-source database managing system. It is used for implementing databases. For any website or any other application, there must be some database required. This database is a type of server. You can implement a database & connect it to the server. It will help to extract data from the database using queries. It is the same operation as we do in SQL query language. We can add, access, and format data in the table of MySQL.

Features:

  • It is open source and easy to download and install.
  • It is a very fast database language.
  • Implementing a database and using is very simple.
  • It can be installed in any operating system.

Installing MySQL on macOS

To install MySQL on macOS follow the following steps

Step 1: Go to the official website of MySQL using any browser and  Scroll down there you will find the following link.

Go-to-the-official-website-of-MySQL

Step 2: Then click on the MySQL Community Server link.

Click-on-the-MySQL-Community-Server-link

Step 3: If you are using the latest machine, then simply you can click download there. But if you are using an older machine then go for archives. As my machine is an older one I have to move to Archives.

Download-the-MySQL-Community-server

Step 4: Then choose the version there and download the proper software.

Choose-the-version-and-click-on-download

Step 5: Then start the installation process, and click on the continue button.

Click-on-continue

Step 6: Then click on the install button to move forward.

Click-on-install-button

Step 7: Wait for the installation process to complete.

Wait-for-the-installation-to-complete.

Step 8: Then click on the Next button for the next process.

Click-on-Next-button

Step 9: Provide some strong passwords and then click on the Finish button.

Click-on-Finish-button

Step 10: Wait for some time till the process is going on.

Wait-for-some-time-till-the-process-is-going-on

Step 11: Then you will find your installation is successful.

Click-on-Close-button

Step 12: At last, go to system preferences, there you will find MySQL is installed.

Goto-system-preferences-there-you-will-find-MySQL-is-installed

How to use MySQL?

Steps for using MySQL:

Step 1: For working with MYSQL, you need to open your terminal. Then navigate to the installed folder.

Step 2: Then you have to run the following command. Whenever you need to work in MySQL, this command should be run fast.

mysql -u root -p

Start-MySQL

Step 3: Then MySQL will start working. Then write the following command. This command will show how many databases are there in your MySQL Server.

show databases;

Show-all-the-database

Step 4: Now, if you want to add a new database, you need to run the following command. It will create a new database.

create database <database_name>;

Creating-new-database

Step 5: Then again run the following command, there you will find your database is added to MySQL.

show databases;

Finding-the-database

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 05 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials