Installation process of MySQL5.7.22 on Mac

Installation process of MySQL5.7.22 on Mac

1. Use the installation package to install MySQL (online download is too slow, if you need the installation package, you can leave a message at the bottom of the article and I will send it to you) Double-click to open the installation file

Double-click the pkg file to install all the way down. Remember to save the password in the last pop-up box (it is the password of your mysql root account). Under normal circumstances, the installation is successful. At this point, the installation is successful, but additional configuration is required:

(1) Enter System Preferences

(2) Click mysql

(3) Start the MySQL service

Add mysql to the system environment variables

Enter /usr/local/mysql/bin and check whether there is mysql in this directory

Execute vim ~/.bash_profile
Add the mysql/bin directory to the file, see pic7:
PATH=$PATH:/usr/local/mysql/bin
After adding, press esc and enter wq to save the changes.
Finally, enter source ~/.bash_profile in the command line

pass

mysql -u root -p

Log in to mysql, you will be asked to enter the password

Apple->System Preferences->Click MySQL at the bottom. In the pop-up page, turn off the MySQL service (click Stop MySQL Server).

step2:

Enter the terminal and enter: cd /usr/local/mysql/bin/

After pressing Enter, log in with administrator privileges sudo su

After pressing Enter, enter the following command to disable the mysql authentication function./mysqld_safe --skip-grant-tables &

After pressing Enter, MySQL will automatically restart (the status of MySQL in the preferences will become running)

step3.

Enter the command ./mysql

After pressing Enter, enter the command FLUSH PRIVILEGES;

After pressing Enter, enter the command

MySQL 5.7.6 and later: ALTER USER 'root'@'localhost' IDENTIFIED BY 'your new password';

MySQL 5.7.5 and earlier: SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your new password');

At this point, the password change is complete and you can log in successfully.

Summarize

The above is the installation process of MySQL5.7.22 on Mac 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:
  • iOS Assembly Tutorial - ARM64 Assembly Basics Tutorial
  • MySQL 5.7.22 binary package installation and installation-free version Windows configuration method
  • Ubuntu16.04 installation mysql5.7.22 graphic tutorial
  • How to install MySQL server community version MySQL 5.7.22 winx64 in win10
  • The whole process of installing mysql5.7.22 under ARM64 architecture

<<:  How to use vue3 to build a material library

>>:  Detailed explanation of pipeline and valve in tomcat pipeline mode

Recommend

MySQL 8.0.21 installation steps and problem solutions

Download the official website First go to the off...

Solution to the routing highlighting problem of Vue components

Preface Before, I used cache to highlight the rou...

Example of implementing the Graphql interface in Vue

Note: This article is about the basic knowledge p...

Solution to the failure of 6ull to load the Linux driver module

Table of contents 0x01 Failed to load the driver ...

How to define input type=file style

Why beautify the file control? Just imagine that a...

A brief discussion of the interesting box model of CSS3 box-sizing property

Everyone must know the composition of the box mod...

Query the data of the day before the current time interval in MySQL

1. Background In actual projects, we will encount...

Summary of data interaction between Docker container and host

Preface When using Docker in a production environ...

Complete steps to implement face recognition login in Ubuntu

1. Install Howdy: howdy project address sudo add-...

What are the differences between var let const in JavaScript

Table of contents 1. Repeated declaration 1.1 var...

Implementation of react loop data (list)

First, let's simulate the data coming from th...

Detailed explanation of moment.js time and date processing

Monday to Sunday time format conversion (Y --- ye...

MySQL MyISAM default storage engine implementation principle

By default, the MyISAM table will generate three ...