Install MySQL database records on Mac

Source: Internet
Author: User
Tags mysql commands mysql in mysql version
  • Download MySQL for mac:https://downloads.mysql.com/archives/community/
    Note: I downloaded the community version, and the MySQL version is consistent with your Mac version. Of course, if you have previously installed other MySQL versions, be sure to uninstall them first.

  • Double-click MYSQL-8.0.0-DMR-OSX10.11-X86_64.DMG to unzip and install.

  • Continue, Continue, Agree, Install. Record the password in the pop-up window.

  • Go to System Preferences, find MySQL, start the service

  • Add MySQL commands to the system
  • (1). Go to/usr/local/mysql/bin to see if there is MySQL in this directory
    (2). Perform Vim ~/.bash_profile
    Add the Mysql/bin directory to the file
    Path= $PATH:/usr/local/mysql/bin
    When you are finished adding, press ESC, and then enter Wq save.
    (3). Finally enter source ~/.bash_profile on the command line

    1. Log in to MySQL via Mysql-uroot-p and enter the previously saved password

    2. Reset MySQL initial password:

    SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' NewPassword ');

    Reference:

    1,54915916
    2,https://www.cnblogs.com/yangjig/p/6014198.html

    Install MySQL database records on Mac

    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.