MySQL installation and configuration tutorial on Mac

Source: Internet
Author: User
Tags mysql download

MySQL installation and configuration tutorial on Mac

This example shares the MySQL installation tutorial on Mac for your reference. The details are as follows:

Download

MySQL Community Server: https://dev.mysql.com/downloads/mysql/

Go to the MySQL download interface (https://dev.mysql.com/downloads/mysql/), if you are using Mac OS access, then it will be selected for you by default Mac OS X platform, the following lists the MySQL versions that can be used on Mac OS. If you are using another Platform, Select the "Select Platform" option from the drop-down list.

There are many MySQL versions on Mac OS, including platform-based, such as 10.5/second and. dmg. Here I choose. dmg. Click download on the right to download.

Next, you will be redirected to another interface, which prompts you to register it. You can directly select "No thanks, just take me to downloads!" at the bottom !", Then, the download page is displayed. This page lists many servers for download. You can select a server to download.

Double-click the pkg file and install it all the way down. Remember to save the password in the last pop-up box (it is your mysql root Account Password)


MYSQL2.png is successfully installed normally.

In this case, the installation is successful, but additional configuration is required:

(1) Go to system preference settings


(2) Click mysql


(3) Enable the mysql Service


Enter the mysql-u root-p command in the command line to prompt that no commod not found exists. We also need to add mysql to the system environment variable.

(1). Enter/Usr/local/mysql/bin,Check whether mysql exists in this directory. For details, see pic6.
(2) execute vim ~ /. Bash_profile
Add the mysql/bin directory to this file. For details, see pic7:
PATH = $ PATH:/usr/local/mysql/bin
After adding the file, Press esc and enter wq to save the file.
Finally, enter source ~ in the command line ~ /. Bash_profile



Now you can log on to mysql through mysql-u root-p, and you will be asked to enter the password, that is,> fj on pic3...
After successful logon, you can use the following command to change the password

Set password for 'root' @ 'localhost' = PASSWORD ('mysql123456 ');

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.