MySQL 8.0.16 installation and configuration graphic tutorial under macOS

MySQL 8.0.16 installation and configuration graphic tutorial under macOS

This article shares the installation and configuration tutorial of MySQL 8.0.16 under macOS for your reference. The specific contents are as follows

1. Download the installer

Open MySQL official website

Select DOWNLOADS -> Community -> NySQL Community Server.

Scroll to the bottom of the page and select the operating system, here it is 8.0.16. The installation package is suitable for macOS 10.14 version and is compatible with both 32-bit and 64-bit.

Select the first one here to download the dmg file directly to your local computer.

A registration or login prompt will pop up immediately. Select Skip and download the installation package directly.

Save the installation package locally.

2. Use the installation program

Open the installation package to start the installation process.

Step 1.Introduction -> Continue.

Step 2. Permission -> Continue -> Agree

Step3. Installation Type -> Installation

Step4. Configuration -> Select the first strong password method -> next

Enter a password that must be at least 8 characters long. It is recommended that it be a mixture of numbers, letters, and special characters. -> Finish

Step5. Installation completed, close.

3. Service startup

Open System Preferences, find the "MySQL" icon at the bottom, and click to open it.

If it is displayed as shown below, "Stop MySQL Server", it means the service has been started. Otherwise, if it is "Start MySQL Server", it means the service is shut down and you need to click to start it manually.

Click Configuration to view related configurations.

4. Terminal startup

Open the Mac's built-in "Terminal".

The window content displays "[Computer Name]MacBook:~ [User Name]$"

Enter the code after the $ sign: "mysql –u root –p" (note that there is a space before each hyphen, for a total of three spaces) and press Enter.

Case 1: If "Enter password:" appears, enter the password set during installation above. Press Enter.

Case 2: If command not found appears, enter the code again after $ on a new line: "cd /usr/local/bin/" (note there is a space after cd) and press Enter.

A new line of content in the window displays "[Computer Name]MacBook:bin [User Name]$".

Type "sudo ln –fs /usr/local/mysql/bin/mysql/mysql" after the new $. (Note the difference between i and l, 4 spaces in total).

When "Password:" appears, enter the computer user password, which is the power-on password. After the Enter key is pressed successfully, enter the code again after the new $: "mysql –u root –p"

(Note that there is a space before each hyphen, a total of 3 spaces) and press Enter. Go to situation 1.

Case 3: After entering the code: "mysql –u root –p", it returns: -bash: mysql: command not found

1. Open the Mac terminal and enter: vim ~/.bash_profile

2. Then enter: i or press the insert button on the keyboard to enter the input state. There is an insert button at the bottom.

3. Then enter: PATH=$PATH:/usr/local/mysql/bin

4. Then press esc to exit the input state, and the insert display at the bottom will disappear

5. Finally, hold down the shift key and enter: (colon)---------Note: You must hold it down at the same time, otherwise you will not be able to enter wq later

6. Enter wq to save the input, and it will automatically exit to the terminal interface

7. Then enter: source ~/.bash_profile to make the environment variables effective

8. Close the terminal and reopen it. Transfer to situation 1

Eventually the "mysql>" cursor appears. See the figure below for details.

5. Test whether the installation is successful

Enter "SHOW DATABASES;" after "mysql>" (note the s and ; at the end). If the following is displayed, it means the installation is successful.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 8.0.16 installation and configuration method graphic tutorial under Windows
  • mysql installer community 8.0.16.0 installation and configuration graphic tutorial
  • MySQL 8.0.16 installation and configuration tutorial under Windows 10
  • MySQL 8.0.16 compressed package installation and configuration method graphic tutorial
  • MySQL 8.0.16 winx64 installation and configuration method graphic tutorial
  • Steps for installing MySQL 8.0.16 on Windows and solutions to errors
  • MySQL 8.0.16 installation and configuration tutorial under CentOS7
  • MySql 8.0.16-win64 Installation Tutorial
  • Installation and configuration tutorial of MySQL 8.0.16 under Win10
  • mysql 8.0.16 winx64.zip installation and configuration method graphic tutorial

<<:  Several ways to implement 0ms delay timer in js

>>:  How to install suPHP for PHP5 on CentOS 7 (Peng Ge)

Recommend

JavaScript implementation of drop-down list

This article example shares the specific code of ...

How to automatically start RabbitMq software when centos starts

1. Create a new rabbitmq in the /etc/init.d direc...

Fixed table width table-layout: fixed

In order to make the table fill the screen (the re...

How to reduce memory usage and CPU usage of web pages

Some web pages may not look large but may be very...

Some front-end basics (html, css) encountered in practice

1. The div css mouse hand shape is cursor:pointer;...

JavaScript to implement a simple clock

This article example shares the specific code for...

What are the rules for context in JavaScript functions?

Table of contents 1. Rule 1: Object.Method() 1.1 ...

How to make JavaScript sleep or wait

Table of contents Overview Checking setTimeout() ...

WeChat Mini Program Lottery Number Generator

This article shares the specific code of the WeCh...

Solution to Ubuntu 20.04 Firefox cannot play videos (missing flash plug-in)

1. Flash plug-in package download address: https:...

Detailed explanation of docker command to backup linux system

tar backup system sudo tar cvpzf backup.tgz --exc...