Install MySQL under Mysql-mac

Source: Internet
Author: User

1. Download the DMG installation file on the official website.

2. After the download is complete, run the installation file, follow the steps to install, the installation will pop up a box to show the temporary password !

3. Edit the ~/.BASHRC file, configure the Quick Start/stop/restart/cdhome/aliases:

# # MySQL [
Alias Alias-start-mysql= ' sudo/usr/local/mysql-5.7.20-macos10.12-x86_64/support-files/mysql.server start '
Alias alias-stop-mysql= ' Sudo/usr/local/mysql-5.7.20-macos10.12-x86_64/support-files/mysql.server stop '
Alias alias-restart-mysql= ' sudo/usr/local/mysql-5.7.20-macos10.12-x86_64/support-files/mysql.server restart '
# # MySQL]

# # Quick CD [
Alias Alias-cd-mysql-home= ' cd/usr/local/mysql-5.7.20-macos10.12-x86_64 '
# # Quick CD]

4. Execute: SOURCE ~/.BASHRC command to make it effective.

5. Edit the ~/.bash_profile file, configure the MySQL environment variable, and add it to path:

# # MySQL [
Export mysql_home=/usr/local/mysql-5.7.20-macos10.12-x86_64
# # MySQL]
Export path= $PATH: $M 2_home/bin: $MYSQL _home/bin

6. Repeat step 4.

7. Execute: Alias-start-mysql, enter the password of the current notebook login user .

8. Execute: Mysql-uroot-p-p3306-h127.0.0.1, enter the temporary password generated during installation .

9. Execute: SET PASSWORD = PASSWORD (' root ');

10. Execute: Quit, quit MySQL connection.

OK, execute: mysql-uroot-proot-p3306-h127.0.0.1 to see if the password was reset successfully.

Install MySQL under Mysql-mac

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.