How to Install Mysql on Mac OS

Tech

How to Install Mysql on Mac OS

Mysql is a database management system, initial release happened in 1995 by ORACLE which is free and open source. Explore the opensource MySQL in Github. There are multiple ways to install on Mac OS, here we have listed the easiest Setup. Let’s have a look at How to Install Mysql on Mac OS.

How to install:

Step 1: Download the latest version of MySQL from the website to install the MySQL, We will be downloading the community server. Skip the Oracle signing option, Go ahead with downloading the file. The file size will be approximately 400 mb.

install mysql window

Step 2: After that extract the file, Double click and open the .pkg file and run the installation. Once the installation is done, you may get a password in a pop window. Keep the password safe, you may need it when configuring mysql for mac.

Step 3: It may take a while to finish the configuration in the mac, Once it is done open the terminal, make sure the MySQL running in the background, please watch the attached video for more reference related to the auto-starting of MySQL when the system turns on.

How to Install Mysql on Mac OS

Step 4:  Similarly put the path like this. Once you enter the 1st command Mysql on the terminal will ask for the password, Give the same password you used in Step 2. Following that enter the 2nd command given below.

 sudo/usr/local/mysql/bin/mysql -u root -p
 sudo /usr/local//mysql/bin/mysql/ -h 127.0.0.1 -u root

Step 5: Now The Installation has successfully completed, the SHOW DATABASE command will show the existing database list in the terminal. QUIT to exit from the SQL Terminal.

MySQL on macOS with errors resolved

Some case there will be errors when you execute the Mysql on Mac os Terminal, For this Go to System Terminal, Make sure the SQL is running already and enabled to run when system Startup. Else you can enter a command in Terminal to start the sql service instantly.

mysql.server start
Setup terminal. How to Install Mysql on Mac OS

Still facing Errors while setting up you can do Flush Privilages or the following commands to make it work, These are the common error while set up mysql on mac.

sudo mysql
mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

Watch the video :

Final Verdict :

In conclusion, I hope you enjoyed reading this article on “ How to Install Mysql on Mac OS ”, If yes, then don’t forget to spread the word about it. We would love to hear the feedback from your side and if any doubts contact us. Signing off.  Sanjay@recodehive.com

 
Leave a Comment on How to Install Mysql on Mac OSTagged , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top