Detailed graphic and text instructions for installing MySQL 5.7.20 on Mac OS

Detailed graphic and text instructions for installing MySQL 5.7.20 on Mac OS

Installing MySQL 5.7 from TAR.GZ on Mac OS X Compared to MySQL 5.6, there are two differences in the installation of version 5.7:

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

2: The initial password generation has changed. The default root password for version 5.6 is empty after the tar gz initialization is completed. A temporary root password will be generated for version 5.7 after the initialization is completed.

1. Enter the following address in the browser

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

https://www.jb51.net/softs/451120.html

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

Related reading:

The main differences between MySQL 4.1/5.0/5.1/5.5/5.6

MySQL installation tutorials on various systems

Summarize

The above is the detailed graphic and text explanation of the MySQL5.7.20 installation tutorial under Mac OS system introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor 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:
  • mysql 5.7.20 win64 installation and configuration method
  • Installation and uninstallation of MySQL 5.7 decompressed version and summary of common problems
  • Detailed steps for installing the decompressed version of MySQL 5.7.20 (two methods)
  • MySQL 5.7.20 common download, installation and configuration methods and simple operation skills (decompression version free installation)
  • MySQL 5.7.20 compressed version download and installation simple tutorial
  • MySQL 5.7.19 installation tutorial under Windows 10 How to change the root password of MySQL after forgetting it
  • Tutorial on how to install and configure the unzipped version of MySql under Windows 10
  • mysql5.7.17 installation and configuration example on win2008R2 64-bit system

<<:  How to enter directory/folder in Linux without using CD command

>>:  Design a data collector with vue

Recommend

Detailed explanation of how to use WeChat mini program map

This article example shares the specific implemen...

Detailed explanation of Vue's simple store

The simplest application of store in Vue is globa...

Detailed explanation of how to use eslint in vue

Table of contents 1. Description 2. Download rela...

User-centered design

I've been asked a lot lately about an apparen...

How to strike a balance between ease of use and security in the login interface

Whether you are a web designer or a UI designer, ...

Summary of Kubernetes's application areas

Kubernetes is the leader in the container orchest...

Vue implements the method example of tab routing switching component

Preface This article introduces the use of vue-ro...

Summary of knowledge points about null in MySQL database

In the MySQL database, null is a common situation...

Linux uses iptables to limit multiple IPs from accessing your server

Preface In the Linux kernel, netfilter is a subsy...

Make your website run fast

Does performance really matter? Performance is im...

Create a screen recording function with JS

OBS studio is cool, but JavaScript is cooler. Now...

Detailed explanation of explain type in MySQL

Introduction: In many cases, many people think th...

Mobile development tutorial: Summary of pixel display issues

Preface I believe that in the process of mobile t...

Vue-pdf implements online preview of PDF files

Preface In most projects, you will encounter onli...