Mysql 5.7.20 installation tutorial on Mac OS:

Source: Internet
Author: User

Mysql 5.7.20 installation tutorial on Mac OS:

MySQL 5.7 is installed in TAR. GZ mode on Mac OS X. Compared with MySQL 5.6, MySQL 5.7 is installed in two different ways:

1: The initialization method is changed from scripts/mysql_install_db -- user = mysql to bin/mysqld -- initialize -- user = mysql;

2: The initial password generation is changed. After tar gz Mode Initialization is complete in version 5.6, the root password is blank by default. A temporary root password is generated in version 5.7 after Initialization is complete;

1. Enter the following address in the browser:

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

Http://www.bkjia.com/softs/451120.html

 

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

  aliasmysql=/usr/local/mysql/bin/mysql

  aliasmysqladmin=/usr/local/mysql/bin/mysqladmin  

Copy the preceding two commands to the terminal and give the two addresses a temporary alias.

The purpose is to directly execute mysql or mysqladmin in the next execution.

No need to switch back and forth Directories

 
 

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

  mysqladmin -u root -p password root123

Root123 is my new password. You can change it to the password you want to set.

Press enter and prompt to enter the password. In this case, the entered password is not your computer password.

It is the password of the database.

The default user name and password are available before 5.7, both of which are root

However, after 5.7, only the Default User Name P: root

The default password will be automatically assigned to you, and will be automatically assigned to you during installation.

You can also view it in the mac notification bar.

A Database Password is automatically generated.

  

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:aliasmysql=/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 reading:

Major differences between MySQL 4.1, 5.0, 5.1, 5.5, and 5.6 versions

Install mysql in various systems

Summary

The above is a graphic explanation of the MySQL5.7.20 installation tutorial for Mac OS. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.