How to install MySQL 8.0 and log in to MySQL on MacOS

How to install MySQL 8.0 and log in to MySQL on MacOS

Follow the official tutorial, download the installation package, click Install, and if you want to start it in the command line, you also need to set the command path:

In the command line, open the configuration file .bash_profile:

vim ~/.bash_profile

Add the following line to the last line:

PATH=$PATH:/usr/local/mysql/bin

Press the esc key and enter wq to save and exit.

At the command line, enter:

source ~/.bash_profile

After that, you can connect to the MySQL database using mysql -u root -p in the command line

Summarize

The above is what I introduced to you about installing MySQL8.0 and logging in to MySQL under MacOS. I hope it will be helpful to you. 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!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • MySQL 8.0.11 MacOS 10.13 installation and configuration method graphic tutorial
  • Install Apache2.4+PHP7.0+MySQL5.7.16 on macOS Sierra
  • Install Solr on macOS and index MySQL

<<:  Implementation of VUE infinite level tree data structure display

>>:  How to build pptpd service in Alibaba Cloud Ubuntu 16.04

Recommend

Vue3+TypeScript encapsulates axios and implements request calls

No way, no way, it turns out that there are peopl...

MySQL data operation-use of DML statements

illustrate DML (Data Manipulation Language) refer...

PHP related paths and modification methods in Ubuntu environment

PHP related paths in Ubuntu environment PHP path ...

How to effectively compress images using JS

Table of contents Preface Conversion relationship...

Html and CSS Basics (Must Read)

(1) HTML: HyperText Markup Language, which mainly...

Nginx local directory mapping implementation code example

Sometimes you need to access some static resource...

Use Rem layout to achieve adaptive

I have written an article about mobile adaptation...

Example code for implementing triangles and arrows through CSS borders

1. CSS Box Model The box includes: margin, border...

A complete explanation of MySQL high availability architecture: MHA architecture

Table of contents 1. Introduction 2. Composition ...

How to use negative margin technology to achieve average layout in CSS

We usually use float layout to solve the compatib...