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

CSS border adds four corners implementation code

1.html <div class="loginbody"> &l...

Vue's guide to pitfalls using throttling functions

Preface In a common business scenario, we need to...

Linux system (Centos6.5 and above) installation jdk tutorial analysis

Article Structure 1. Preparation 2. Install Java ...

Tutorial on installing php5, uninstalling php, and installing php7 on centos

First, install PHP5 very simple yum install php T...

Vue implements a simple shopping cart example

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

Use of Vue3 pages, menus, and routes

Table of contents 1. Click on the menu to jump 1....

JavaScript to achieve a simple page countdown

This article example shares the specific code of ...

Detailed explanation of CSS3 animation and new features of HTML5

1. CSS3 animation ☺CSS3 animations are much easie...

How to set up the terminal to run applications after Ubuntu starts

1. Enter start in the menu bar and click startup ...

Implementation of 2D and 3D transformation in CSS3

CSS3 implements 2D plane transformation and visua...

Introduction and usage examples of ref and $refs in Vue

Preface In JavaScript, you need to use document.q...

One line of CSS code to achieve the integration of avatar and national flag

It’s National Day, and everyone is eager to celeb...