Two ways to install MySQL on Mac (with configuration)

Source: Internet
Author: User
Tags mysql in

1. Install MySQL using the installation packagedouble-click to open the installation file

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)

under normal circumstances, the installation is successful.
    • The installation is successful, but additional configuration is required:

      (1) Enter System Preferences

(2) Click MySQL



(3) Turn on MySQL service


    • Configure the MySQL system environment variable
    • (1). Enter / Usr/local/mysql/bin, see if there is MySQL in this directory, see PIC6.
    •  (2). Perform vim ~/. Bash_profile Add Mysql/bin directory to this file, see Pic7:path= $PATH: /usr/ Local/mysql/bin add complete, press ESC, and then enter Wq save. Finally, enter source ~/.bash_profile          
    on the command line
    • Now you can login to MySQL through mysql-uroot-p , will let you enter the password, is the saved MySQL default password.
      After the login is successful, you can change the password by following the command
      SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘newpass‘);

Two ways to install MySQL on 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.