Download MySQL 5.7 and detailed installation diagram for MySql on Mac

Download MySQL 5.7 and detailed installation diagram for MySql on Mac

1. Enter the following address in the browser

https://dev.mysql.com/downloads/mysql/

2. Enter the following interface: Click the location below and select Skip Login

Click here to download directly.

3. After the download is complete, double-click to open it, and the following interface will pop up, then continue to click

Keep clicking Continue below, just like installing other software

4. Start MySQL

After the installation is complete, go to the settings and check the following options. If there is MySQL, it means that it has been installed successfully.

After clicking, start MySQL

5. Change the database password

After the startup is complete, open the terminal

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

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

Copy the above two instructions into the terminal and run them, giving the two addresses a temporary alias

The purpose is to be able to directly execute mysql or mysqladmin the next time you execute

No need to switch directories back and forth

Next, change the database password and execute the following command

mysqladmin -u root -p password root123

root123 is my new password, change it to the password you want

After pressing Enter, you will be prompted to enter a password. This time, the password you enter is not your computer password.

The password of the database

Before 5.7, there was a default username and password, both of which were root

But since 5.7, only the default username P:root

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

We can also check it from the Mac notification bar.

The following figure automatically generates a database password

The default password is everything after localhost:. Enter it and press Enter.

(You cannot see the password you enter in the command line on Mac, so be careful not to make a mistake when entering the password)

6. Enter the database

See the above information, the modification is successful

Next, enter the database

Make sure you have executed: alias mysql= /usr/local/mysql/bin/mysql

If it is not executed, you need to switch to the above directory to execute the mysql command

Otherwise, it prompts that mysql is not found.

Next, execute the following command: mysql -u root -p

Note: Do not write anything after -p, then press Enter.

You will be asked to enter the password. The password at this time is the password you modified above

What I entered here is: root123

Seeing the following information, all instructions have been entered into the database

Summarize

The above is the introduction of downloading MySQL5.7 and detailed installation diagrams for MySql under Mac system. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • MySQL5.7+ MySQL Workbench installation and configuration method graphic tutorial under MAC
  • MySQL 8.0.11 MacOS 10.13 installation and configuration method graphic tutorial
  • What to do if you forget the initial password when installing MySQL on Mac
  • Detailed installation and configuration of MySql on Mac
  • Complete steps to install mysql5.7 on Mac (with pictures and text)
  • Mac installation mysqlclient process analysis

<<:  How to install the standalone version of spark in linux environment without using hadoop

>>:  Explanation of building graph database neo4j in Linux environment

Recommend

MySQL password is correct but cannot log in locally -1045

MySQL password is correct but cannot log in local...

Uniapp realizes sliding scoring effect

This article shares the specific code of uniapp t...

Detailed explanation of the installation and use of Vue-Router

Table of contents Install Basic configuration of ...

Talk about how to identify HTML escape characters through code

Occasionally you'll see characters such as &#...

How to set up scheduled tasks in Linux and Windows

Table of contents Linux 1. Basic use of crontab 2...

Native js to achieve star twinkling effect

This article example shares the specific code of ...

How to prevent Flash from covering HTML div elements

Today when I was writing a flash advertising code,...

Vue based on Element button permission implementation solution

Background requirements: The ERP system needs to ...

A brief discussion on mobile terminal adaptation

Preface The writing of front-end code can never e...

avue-crud implementation example of multi-level complex dynamic header

Table of contents Preface Background data splicin...

Examples of using HTML list tags dl, ul, ol

Copy code The code is as follows: <!-- List ta...