Install MySQL and Set MySQL root user password on Mac OS X


In this post we will learn how to How To Install MySQL on Mac OS X. The same procedure can be used for installing MySQL on Mac OS X.

How to add MySQL to $PATH variable:
cd to your home folder
$ open -t .bash_profile
Try adding the following line to your .bash_profile file.
export PATH=${PATH}:/usr/local/mysql/bin/

Setting the MySQL root user password on OS X
$ mysql -u root -p
mysql$ ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘MyNewPass’;

How to Change the MySQL root Password in macOS via Command Line.

★★★Top Online Courses From ProgrammingKnowledge ★★★
Python Programming Course ➡️ ⚫️
Java Programming Course ➡️ ⚫️
Bash Shell Scripting Course ➡️ ⚫️
Linux Command Line Tutorials ➡️ ⚫️
C Programming Course ➡️ ⚫️
C++ Programming Course ➡️ ⚫️
PHP Programming Course ➡️ ⚫️
Android Development Course ➡️ ⚫️
C# Programming Course ➡️ ⚫️
JavaFx Programming Course ➡️ ⚫️
NodeJs Programming Course ➡️ ⚫️
Jenkins Course For Developers and DevOps ➡️ ⚫️
Scala Programming Tutorial Course ➡️ ⚫️
Bootstrap Responsive Web Design Tutorial ➡️ ⚫️
MongoDB Tutorial Course ➡️ ⚫️
QT C++ GUI Tutorial For Beginners ➡️

★★★ Online Courses to learn ★★★
Data Science – |
Machine Learning –
Artificial Intelligence – |
Data Analytics with R Certification Training-
DevOps Certification Training –
AWS Architect Certification Training –
Java, J2EE & SOA Certification Training –
AI & Deep Learning with TensorFlow –
Big Data Hadoop Certification Training-
AWS Architect Certification Training –
Selenium Certification Training –
Tableau Training & Certification –
Linux Administration Certification Training-

★★★ Follow ★★★
My Website –

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!


Xem thêm bài viết khác:


  1. Les Mystères De Salon De Provence 12 July, 2020 at 09:10 Reply

    Thank you man ! it was perfect. It has helped me a lot. I recommend, you re the best !

  2. sruti veda 12 July, 2020 at 09:10 Reply

    When I click on a new window option for the terminal , the recurring command not found is obtained, and there is no request for the password

  3. Shahin Akmal 12 July, 2020 at 09:10 Reply

    Fantastic video, I was really struggling in getting this set up on my Mac before this video. Thanks!

  4. Rajesh Achitapur 12 July, 2020 at 09:10 Reply

    hey forgot to save the one time pwd root password for mysql server while installing….
    How to login now

  5. thakur diva 12 July, 2020 at 09:10 Reply

    hey forgot to save the otp root password for mysql server while installing, now I am not able to make a root login , can you plz help me with this..??

  6. Michael Bahu 12 July, 2020 at 09:10 Reply

    I entered in the prompt "mysql -u root -p" and even after I refreshed it, the terminal still says "command not found"

Leave a reply