Install MySQL under Mac (with configuration)

Source: Internet
Author: User
Tags mysql download

    • First you need to download

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

Go to MySQL Download interface (https://dev.mysql.com/downloads/mysql/), if you are using Mac OS to access, then it will be the default for you to choose the Mac OS X platform, and the following are listed in the Mac The version of MySQL that can be used on the OS, and if it is a different platform, just select it in the drop-down list of the "Select Platform" option.

There are many versions of MySQL on Mac OS, including platforms such as 10.5/10.6, then there are 32-bit and 64-bit, which you choose according to your own system, Then there is the suffix name of the file. tar.gz and. DMG, here I choose. dmg. Click Download on the right to download.

Then will jump to another interface, this interface is prompted you do not need to register, directly select the bottom of the "no thanks,just Take I to downloads!", then this really jump to the download interface, this interface column a lot of servers for download, Selecting a server to download is OK.

    • Double-click Pkg file Installation
    • All the way down, remember to save the last pop-up box password (it's your MySQL root account password)

Mysql2.png
    • Under normal circumstances, the installation is successful.
    • The installation is successful, but additional configuration is required:

      (1) Enter System Preferences


Pic3.png

(2) Click MySQL


Pic4.png


(3) Turn on MySQL service


Pic5.png
    • At this point we enter the Mysql-u root-p command at the command line to prompt for no commod not found, we also need to add MySQL to the system environment variable.
      (1).进入/usr/local/mysql/bin,查看此目录下是否有mysql,见pic6。(2).执行vim ~/.bash_profile    在该文件中添加mysql/bin的目录,见pic7:    PATH=$PATH:/usr/local/mysql/bin添加完成后,按esc,然后输入wq保存。最后在命令行输入source ~/.bash_profile


      Pic6.png

Pic7.png
    • Now you can login MySQL through mysql-u root-p, will let you enter the password, is pic3 on the >fj ...
      After the login is successful, you can change the password by following the command
      SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘mysql123456‘);

       

Install MySQL under Mac (with configuration)

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.