Download MySQL5.7 from MySql on Mac and install mysqlmysql5.7

Source: Internet
Author: User

Download MySQL5.7 from MySql on Mac and install mysqlmysql5.7

1. Enter the following address in the browser:

Https://dev.mysql.com/downloads/mysql/

 

2. Go to the following page: click the following position and select skip logon.

Click this button to download it directly.

 

3. After the download is complete, double-click it to open it. The following page is displayed, and click Continue.

  

 

Continue as you are about to install other software.

4. Start MySQL

After the installation is complete, go to the settings to view the following options. If MySQL exists, it indicates that the installation is successful.

  

 

Click to start MySQL

  

 

 

5. Change the Database Password

After the terminal is started, open the terminal

  alias mysql=/usr/local/mysql/bin/mysql

  alias  mysqladmin= /usr/local/mysql/bin/mysqladminCopy the preceding two commands to the terminal and run them. Give the two addresses a temporary alias so that you can directly execute mysql or mysqladmin next time without switching the directory back and forth.

Next, modify the Database Password and run the following command:

Mysqladmin-u root-p password root123

Root123 is my new password. After you change it to the password you want to set and press enter, you will be prompted to enter the password, at this time, the entered password is not your computer password, but the database password has a default user name and password before 5.7. Both are root, but after 5.7, only the Default User Name P: the default root password will be automatically assigned to you. During installation, it will be automatically assigned to you. We can also view it in the mac notification bar, that is, automatically generate a Database Password.

  

The default password is localhost: all the content following it. Enter it and press Enter.

(Mac cannot input the password in the command line, so do not enter an error when entering the password)

  

 

6. Enter the database

The above information is displayed, and the modification is successful.

Next, go to the database.

Make sure that:alias mysql=/usr/local/mysql/bin/mysql

If the command is not executed, you must switch to the preceding directory to execute the mysql command.

Otherwise, the system prompts that mysql is not found.

 

Run the following command: mysql-u root-p

Note:-p is followed by nothing, and press Enter.

You will be asked to enter the password. At this time, the password is the one you modified on it.

What I entered here is: root123

The following information is displayed, indicating that the database has entered.

 

  

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.