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

js to realize a simple disc clock

This article shares the specific code of js to im...

Detailed graphic tutorial on installing centos7 virtual machine in Virtualbox

1. Download centos7 Download address: https://mir...

Solution to "No input file specified" in nginx+php

Today, the error "No input file specified&qu...

Detailed explanation of how to adjust Linux command history

The bash history command in Linux system helps to...

Ubuntu installation cuda10.1 driver implementation steps

1. Download cuda10.1: NVIDIA official website lin...

Vue implements a simple shopping cart example

This article shares the specific code of Vue to i...

CentOS7 64-bit installation mysql graphic tutorial

Prerequisites for installing MySQL: Install CentO...

Detailed explanation of Vue two-way binding

Table of contents 1. Two-way binding 2. Will the ...

Html+css to achieve pure text and buttons with icons

This article summarizes the implementation method...

Introduction to the use of the indeterminate property of the checkbox

When we use the folder properties dialog box in Wi...

Docker View the Mount Directory Operation of the Container

Only display Docker container mount directory inf...

HTML CSS3 does not stretch the image display effect

1. Use the transform attribute to display the ima...

Use of Linux tr command

1. Introduction tr is used to convert or delete a...

In-depth understanding of mathematical expressions in CSS calc()

The mathematical expression calc() is a function ...